change jsgantt to jsGanttImproved
This commit is contained in:
parent
9e70f49fc5
commit
71d153c4e2
@ -1,53 +1,242 @@
|
||||
/* Sample CSS for jsGanttImproved v1.7.3 */
|
||||
div.gantt { font-family:tahoma, arial, verdana, Sans-serif; font-size:10px; color: #2F2F2F; }
|
||||
|
||||
// These are the class/styles used by various objects in GanttChart. However, Firefox has problems deciphering class style when DIVs are embedded in other DIVs.
|
||||
.gantt table { border-collapse: collapse; }
|
||||
.gantt td { padding: 0px; }
|
||||
|
||||
// GanttChart makes heavy use of embedded DIVS, thus the style are often embedded directly in the objects html. If this could be resolved with Firefox, it would
|
||||
/* cell defaults */
|
||||
.gmajorheading,
|
||||
.gminorheading,
|
||||
.gminorheadingwkend,
|
||||
.gtaskcell,
|
||||
.gtaskcellwkend { height: 19px; font-size: 12px; border: #efefef 1px solid; text-align: center; cursor: default }
|
||||
.gtasklist { height: 19px; min-width: 5px; max-width: 5px; width: 5px; border: #efefef 1px solid; border-right: none; } /* all three width values set just to make sure - helps resizing code */
|
||||
|
||||
// make alot of the code look simpleer/cleaner without all the embedded styles
|
||||
/* Additional values for some cell elements */
|
||||
.gtaskheading,
|
||||
.gmajorheading,
|
||||
.gminorheading { background-color: #ffffff; font-weight: bold; font-size: 9px; white-space: nowrap; }
|
||||
.gtaskcellwkend,
|
||||
.gminorheadingwkend { background-color: #f7f7f7; font-weight: bold; font-size: 9px; white-space: nowrap; }
|
||||
td.gtaskcell { text-align: left }
|
||||
td.gspanning { border-left: none; border-right: none; }
|
||||
.gtaskcelldiv { position: relative; }
|
||||
|
||||
/* Task list defaults */
|
||||
.gtaskheading,
|
||||
.gname,
|
||||
.gtaskname,
|
||||
.gresource,
|
||||
.gduration,
|
||||
.gpccomplete,
|
||||
.gstartdate,
|
||||
.genddate { height: 18px; white-space: nowrap; border: #efefef 1px solid; }
|
||||
|
||||
/* Additional values for some task list elements */
|
||||
.gresource,
|
||||
.gduration,
|
||||
.gpccomplete,
|
||||
.gstartdate div, /* needed for IE8 */
|
||||
.gstartdate { text-align: center; min-width: 70px; max-width: 70px; width: 70px; font-size: 10px; }
|
||||
.genddate div, /* needed for IE8 */
|
||||
.genddate { text-align: center; min-width: 70px; max-width: 70px; width: 70px; font-size: 10px; }
|
||||
.gtaskheading { text-align: center; }
|
||||
.gtaskname div, /* needed for IE8 */
|
||||
.gtaskname { min-width: 170px; max-width: 170px; width: 170px;/* font-size: 9px;*/ border-left: none; }
|
||||
|
||||
.gselector { text-align: left; white-space: nowrap; min-width: 170px; max-width: 170px; width: 170px; }
|
||||
|
||||
.gformlabel { position:relative; top:0px; cursor:pointer; border: #ffffff 1px solid; margin-left: 2px; padding-left: 2px; padding-right: 2px; }
|
||||
span.gformlabel:hover,
|
||||
span.gselected { background-color: #dbecff; border: #cccccc 1px solid;}
|
||||
|
||||
span.gfoldercollapse { color:#000000; cursor:pointer; font-weight:bold; font-size: 12px; font-family: Courier, "Courier New", monospace; }
|
||||
|
||||
.gtasktableh,
|
||||
.gtasktable { border-right: #efefef 1px solid; }
|
||||
.gcharttable { border: #efefef 1px solid; } /* for some reason firefox needs this */
|
||||
|
||||
/* Differentiate Group, Milestone and Ordinary task items (applied to row) */
|
||||
.ggroupitem { background-color: #fbfbfb; font-weight: bold; }
|
||||
.gmileitem,
|
||||
.glineitem { background-color: #ffffff; }
|
||||
|
||||
/* highlight row (applied to row) */
|
||||
.gitemhighlight td { background-image: none; background-color: #fffaaa;}
|
||||
|
||||
/* task bar caption text styles */
|
||||
.gmilecaption,
|
||||
.ggroupcaption,
|
||||
.gcaption { font-weight: normal; font-size: 9px; text-align: left; white-space: nowrap; top:1px; position: absolute; top:2px; }
|
||||
|
||||
.ggroupcaption,
|
||||
.gcaption { right: -126px; }
|
||||
|
||||
/* Task complete %age bar shared attributes */
|
||||
.gtaskcomplete { float:left; overflow: hidden; }
|
||||
|
||||
/* Task complete %age bar */
|
||||
.gtaskcomplete { height:5px; background-color:#000000; margin-top:4px; opacity:0.4; filter: alpha(opacity=40); }
|
||||
|
||||
/* Milestones */
|
||||
.gmilestone { font-size: 14px; position: absolute; top: -2px; }
|
||||
.gmdtop { top: 2px; overflow: hidden; width:0px; height:0px; border-bottom: 5px solid black; border-left: 5px solid transparent; border-top: 5px solid transparent; border-right: 5px solid transparent;}
|
||||
.gmdbottom { top: 2px; overflow: hidden; width:0px; height:0px; border-top: 5px solid black; border-left: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid transparent;}
|
||||
|
||||
/* Task bar shared attributes */
|
||||
.ggroupblack,
|
||||
.gtaskblue,
|
||||
.gtaskred,
|
||||
.gtaskgreen,
|
||||
.gtaskyellow,
|
||||
.gtaskpurple,
|
||||
.gtaskpink { height: 13px; filter: alpha(opacity=90); opacity:0.9; margin-top: 1px; }
|
||||
|
||||
/* Task bars - ggroupblack is set as the default class on the task if it is undefined */
|
||||
.ggroupblack { height: 7px; background: #000000; margin-top: 2px; }
|
||||
.ggroupblackendpointleft { overflow: hidden; width:0px; height:0px; top: 2px; border-top: 4px solid black; border-left: 4px solid transparent; border-bottom: 4px solid transparent; border-right: 4px solid transparent; float: left; }
|
||||
.ggroupblackendpointright { overflow: hidden; width:0px; height:0px; top: 2px; border-top: 4px solid black; border-left: 4px solid transparent; border-bottom: 4px solid transparent; border-right: 4px solid transparent; float: right; }
|
||||
.ggroupblackcomplete { float:left; overflow: hidden; height:3px; filter: alpha(opacity=80); opacity:0.8; background-color:#777777; margin-top:2px; margin-bottom: 2px; }
|
||||
.gtaskblue {
|
||||
background: rgb(58,132,195); /* Old browsers */
|
||||
background: linear-gradient(to bottom, rgba(58,132,195,1) 0%,rgba(65,154,214,1) 20%,rgba(75,184,240,1) 40%,rgba(58,139,194,1) 70%,rgba(38,85,139,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4bb8f0', endColorstr='#3a84c3',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
.gtaskred {
|
||||
background: rgb(196,58,58); /* Old browsers */
|
||||
background: linear-gradient(to bottom, rgba(196,58,58,1) 0%,rgba(211,65,65,1) 20%,rgba(239,76,76,1) 40%,rgba(196,58,58,1) 70%,rgba(135,37,37,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ef4c4c', endColorstr='#c43a3a',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
.gtaskgreen {
|
||||
background: rgb(80,193,58); /* Old browsers */
|
||||
background: linear-gradient(to bottom, rgba(80,193,58,1) 0%,rgba(88,209,64,1) 20%,rgba(102,237,75,1) 40%,rgba(80,193,58,1) 70%,rgba(53,132,37,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#66ED4B', endColorstr='#50c13a',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
.gtaskyellow {
|
||||
background: rgb(247,228,56); /* Old browsers */
|
||||
background: linear-gradient(to bottom, rgba(247,228,56,1) 0%,rgba(239,239,55,1) 20%,rgba(255,255,58,1) 40%,rgba(242,236,55,1) 70%,rgba(241,218,54,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffff3a', endColorstr='#f7e438',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
.gtaskpurple {
|
||||
background: rgb(193,58,193); /* Old browsers */
|
||||
background: linear-gradient(to bottom, rgba(193,58,193,1) 0%,rgba(211,65,211,1) 20%,rgba(239,76,239,1) 40%,rgba(193,58,193,1) 70%,rgba(137,38,137,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ef4cef', endColorstr='#892689',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
.gtaskpink {
|
||||
background: rgb(249,177,245); /* Old browsers */
|
||||
background: linear-gradient(to bottom, rgba(249,177,245,1) 0%,rgba(247,192,243,1) 20%,rgba(247,202,244,1) 40%,rgba(249,192,246,1) 70%,rgba(252,174,247,1) 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7caf4', endColorstr='#fcaef7',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
.gtaskbluecomplete,
|
||||
.gtaskredcomplete,
|
||||
.gtaskgreencomplete,
|
||||
.gtaskyellowcomplete,
|
||||
.gtaskpurplecomplete,
|
||||
.gtaskpinkcomplete { float:left; overflow: hidden; height:5px; filter: alpha(opacity=40); opacity:0.4; background-color: #000000; margin-top:4px; }
|
||||
|
||||
/* Printer friendly styles - we could use these all the time but they are not as pretty! */
|
||||
/* note that "@media print" is not supported in IE6 or 7. Fully patched IE8 should be OK */
|
||||
@media print {
|
||||
.ggroupblack { height:0px; border-top: 7px solid; border-color: #000000; }
|
||||
.gtaskblue { height:0px; border-top: 13px solid; border-color: rgb(58,132,195); }
|
||||
.gtaskred { height:0px; border-top: 13px solid; border-color: rgb(196,58,58); }
|
||||
.gtaskgreen { height:0px; border-top: 13px solid; border-color: rgb(80,193,58); }
|
||||
.gtaskyellow { height:0px; border-top: 13px solid; border-color: rgb(247,228,56); }
|
||||
.gtaskpurple { height:0px; border-top: 13px solid; border-color: rgb(193,58,193); }
|
||||
.gtaskpink { height:0px; border-top: 13px solid; border-color: rgb(249,177,245); }
|
||||
|
||||
.gtaskbluecomplete,
|
||||
.gtaskredcomplete,
|
||||
.gtaskgreencomplete,
|
||||
.gtaskyellowcomplete,
|
||||
.gtaskpurplecomplete,
|
||||
.gtaskpinkcomplete { height:0px; filter: alpha(opacity=40); opacity:0.4; margin-top: -9px; border-top: 5px solid; border-color: #000000; }
|
||||
.ggroupblackcomplete { height: 0px; filter: alpha(opacity=80); opacity:0.8; margin-top:-5px; border-top:3px solid; border-color:#777777; }
|
||||
}
|
||||
|
||||
/* END Task bar styles */
|
||||
.glinev { border-left: 1px solid; width: 0px; }
|
||||
.glineh { border-top: 1px solid; height: 0px; }
|
||||
|
||||
.gDepFS,
|
||||
.gDepSS,
|
||||
.gDepSF,
|
||||
.gDepFF { border-color: #26558b; }
|
||||
.gDepFSArw,
|
||||
.gDepSSArw { overflow: hidden; width:0px; height:0px; border-bottom: 4px solid transparent; border-left: 4px solid #26558b; border-top: 4px solid transparent; border-right: 4px solid transparent;}
|
||||
.gDepFFArw,
|
||||
.gDepSFArw { overflow: hidden; width:0px; height:0px; border-bottom: 4px solid transparent; border-left: 4px solid transparent; border-top: 4px solid transparent; border-right: 4px solid #26558b;}
|
||||
.gCurDate { border-color: #0000ff; }
|
||||
|
||||
|
||||
div.gtaskbarcontainer { z-index: 1; position: absolute; top: 0px }
|
||||
|
||||
..gantt { font-family:tahoma, arial, verdana; font-size:10px;}
|
||||
.JSGanttToolTip {position: absolute; display: block; z-index: 2;}
|
||||
.JSGanttToolTipcont {font-family: tahoma, arial, verdana; font-size: 10px; display: block; background: #ffffff; color: #656565}
|
||||
.gTaskInfo {background: #dbecff; width: 400px; border: #656565 1px solid; border-radius: 10px; padding: 4px 6px 4px 6px; float: left;}
|
||||
.gTtTitle {display: block; font-size: 12px; font-weight: bold; color: #404040; margin-left: 4px; margin-bottom: 1em;}
|
||||
.gTaskLabel {font-size: 11px; font-weight: bold; color: #656565; margin-left: 4px;}
|
||||
.gTaskText {position:absolute; left: 90px; padding-top: 1px; font-size: 10px; font-weight: normal; color: #656565;}
|
||||
.gTaskNotes {font-size: 11px; font-weight: normal; color: #323232; padding: 0 15px; display: block;}
|
||||
.gTIn {padding-top: 10px;}
|
||||
|
||||
..gdatehead { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; HEIGHT: 18px }
|
||||
.gantt { min-width: 1064px; /* 2x LC width */ }
|
||||
.gchartcontainer { padding-left: 532px; /* LC width */ }
|
||||
.gcontainercol { position: relative; float: left; } /* Add a max-height value here if wanted */
|
||||
.glistgrid { width: 532px; /* LC width */ margin-left: -100%; right: 532px; /* LC width */ padding-right: 0px; padding-left: 0px; padding-bottom: 0px; padding-top: 0px; background-color: #ffffff; overflow: hidden; }
|
||||
.glistlbl { width: 532px; /* LC width */ margin-left: -100%; right: 532px; /* LC width */ padding-right: 0px; padding-left: 0px; padding-bottom: 0px; padding-top: 0px; background-color: #ffffff; overflow: hidden; }
|
||||
.glabelfooter { clear: both; }
|
||||
.ggridfooter { clear: both; }
|
||||
|
||||
..ghead { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 24px; HEIGHT: 20px }
|
||||
/*.rhscrpad { width: 150px; position: absolute; top: 0px; height: 1px; }*/
|
||||
|
||||
..gname { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; WIDTH: 18px; HEIGHT: 18px }
|
||||
.gchartgrid { width: 100%; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; padding-top: 0px; background-color: #ffffff; position: relative; overflow: auto; min-height: 0%; }
|
||||
.gchartlbl { width: 100%; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; padding-top: 0px; background-color: #ffffff; position: relative; overflow: hidden; }
|
||||
|
||||
..ghead A { FONT-SIZE: 10px; COLOR: #000000; TEXT-DECORATION: none }
|
||||
/* Old Internet Explorer version hacks */
|
||||
.gantt { _height: 100% } /* otherwise the chart disappears! */
|
||||
div .gantt { _width: 1064px; } /* ie6 fixed width */
|
||||
div.gchartlbl,
|
||||
div.gchartgrid { _width: 532px; } /* ie6 fixed width */
|
||||
div.glistlbl,
|
||||
div.glistgrid {
|
||||
*right: 0px; /* ie7 pulls the content too far left with the negative margin */
|
||||
_right: 532px; /* but ie6 fixed width needs this */
|
||||
_margin-left: -532px; /* ie6 fixed width */
|
||||
}
|
||||
div.gchartgrid { *padding-bottom: 20px; *overflow-y: hidden; } /* variable height design, no need for vertical scroll */
|
||||
td.gmajorheading div { *overflow: hidden; } /* stops resizing fixed width columns if the text is too wide */
|
||||
td.gspanning div { *overflow: hidden; } /* stops resizing fixed width columns if the text is too wide */
|
||||
|
||||
..gheadwkend A { FONT-SIZE: 10px; COLOR: #000000; TEXT-DECORATION: none }
|
||||
/* border transparency tricks */
|
||||
.ggroupblackendpointleft { _border-top: 4px solid black; _border-left: 4px solid pink; _border-bottom: 4px solid pink; _border-right: 4px solid pink; _filter: chroma(color=pink); }
|
||||
.ggroupblackendpointright { _border-top: 4px solid black; _border-left: 4px solid pink; _border-bottom: 4px solid pink; _border-right: 4px solid pink;_filter: chroma(color=pink); }
|
||||
|
||||
..gheadwkend { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 24px; HEIGHT: 20px; background-color: #cfcfcf }
|
||||
.gmdtop { _border-left: 5px solid pink; _border-top: 5px solid pink; _border-right: 5px solid pink; _filter: chroma(color=pink);}
|
||||
.gmdbottom { _border-left: 5px solid pink; _border-bottom: 5px solid pink; _border-right: 5px solid pink; _filter: chroma(color=pink);}
|
||||
|
||||
..gfiller { BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px }
|
||||
.gDepFSArw,
|
||||
.gDepSSArw { _border-bottom: 4px solid pink; _border-top: 4px solid pink; _border-right: 4px solid pink; _filter: chroma(color=pink);}
|
||||
.gDepFFArw,
|
||||
.gDepSFArw { _border-bottom: 4px solid pink; _border-left: 4px solid pink; _border-top: 4px solid pink; _filter: chroma(color=pink);}
|
||||
|
||||
..gfillerwkend { BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px; BACKGROUND-COLOR: #cfcfcf }
|
||||
|
||||
..gitem { BORDER-TOP: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px }
|
||||
|
||||
..gitemwkend { BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px }
|
||||
|
||||
..gmilestone { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 14px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px}
|
||||
|
||||
..gmilestonewkend { BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px}
|
||||
|
||||
..btn { BORDER-RIGHT: #ffffff; BORDER-TOP: #ffffff; FONT-WEIGHT: bold; FONT-SIZE: 10px; BORDER-LEFT: #ffffff; WIDTH: 12px; COLOR: #cccccc; BORDER-BOTTOM: #ffffff; BACKGROUND-COLOR: #ffffff }
|
||||
|
||||
..hrcomplete { BORDER-RIGHT: #000000 2px solid; PADDING-RIGHT: 0px; BORDER-TOP: #000000 2px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: #000000 2px solid; WIDTH: 20px; COLOR: #000000; PADDING-TOP: 0px; BORDER-BOTTOM: #000000 2px solid; HEIGHT: 4px }
|
||||
|
||||
..hrhalfcomplete { BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #000000 2px solid; BORDER-LEFT: #000000 2px solid; WIDTH: 9px; COLOR: #000000; BORDER-BOTTOM: #000000 2px solid; HEIGHT: 4px }
|
||||
|
||||
..gweekend { font-family:tahoma, arial, verdana; font-size:11px; background-color:#EEEEEE; text-align:center; }
|
||||
|
||||
..gtask { font-family:tahoma, arial, verdana; font-size:11px; background-color:#00FF00; text-align:center; }
|
||||
|
||||
..gday { font-family:tahoma, arial, verdana; font-size:11px; text-align:center; }
|
||||
|
||||
..gcomplete { background-color:black; height:5px; overflow: auto; margin-top:4px; }
|
||||
|
||||
DIV.scroll { BORDER-RIGHT: #efefef 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #efefef 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 420px; PADDING-TOP: 0px; BORDER-BOTTOM: #efefef 1px solid; BACKGROUND-COLOR: #ffffff }
|
||||
|
||||
DIV.scroll2 { position:relative; PADDING-RIGHT: 0px; overflow:auto ;overflow-x:scroll;overflow-y:hidden; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 482px; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff }
|
||||
/* Workaround for odd bug in old versions of Opera - no other browser needs this */
|
||||
.glinediv {position: absolute; top: 0px; left: 0px;}
|
||||
|
||||
/* if using setUseSingleCell(1) the following is a suggested set of CSS3 styles to recreate the table grid - won't work on old browsers
|
||||
.ggrouphour td,
|
||||
.gmilehour td,
|
||||
.gitemhour td { background-size: 19px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 18px); width: 100%; height: 19px; }
|
||||
.ggroupday td,
|
||||
.gmileday td,
|
||||
.gitemday td { background-size: 19px 1px, 133px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 18px), linear-gradient(to left, #f7f7f7 39px, transparent 1px, transparent 92px); width: 100%; height: 19px; }
|
||||
.ggroupweek td,
|
||||
.gmileweek td,
|
||||
.gitemweek td { background-size: 37px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 36px); width: 100%; height: 19px; }
|
||||
.ggroupmonth td,
|
||||
.gmilemonth td,
|
||||
.gitemmonth td { background-size: 37px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 36px); width: 100%; height: 19px; }
|
||||
.ggroupquarter td,
|
||||
.gmilequarter td,
|
||||
.gitemquarter td { background-size: 19px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 18px); width: 100%; height: 19px; }
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
3
htdocs/includes/jsgantt/jsgantt.min.js
vendored
3
htdocs/includes/jsgantt/jsgantt.min.js
vendored
File diff suppressed because one or more lines are too long
@ -78,11 +78,11 @@ function reloadGraph() {
|
||||
}
|
||||
|
||||
|
||||
var g = new JSGantt.GanttChart('g', document.getElementById('GanttChartDIV'), 'day');
|
||||
/* For JSGanttImproved var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day'); */
|
||||
//var g = new JSGantt.GanttChart('g', document.getElementById('GanttChartDIV'), 'day');
|
||||
var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day');
|
||||
|
||||
/* For JSGanttImproved if (g.getDivId() != null) */
|
||||
if (g)
|
||||
if (g.getDivId() != null)
|
||||
//if (g)
|
||||
{
|
||||
var booShowRessources = 1;
|
||||
var booShowDurations = 1;
|
||||
@ -91,9 +91,9 @@ if (g)
|
||||
var graphFormat = "day";
|
||||
|
||||
g.setDateInputFormat('mm/dd/yyyy'); // Set format of input dates ('mm/dd/yyyy', 'dd/mm/yyyy', does not work with 'yyyy-mm-dd')
|
||||
g.setDateDisplayFormat('<?php echo $dateformat; ?>');
|
||||
/* For JSGanttImproved g.setDateTaskDisplayFormat('<?php echo $datehourformat; ?>'); */
|
||||
/* For JSGanttImproved g.setDayMajorDateDisplayFormat('dd mon'); */
|
||||
//g.setDateDisplayFormat('<?php echo $dateformat; ?>');
|
||||
g.setDateTaskDisplayFormat('<?php echo $datehourformat; ?>');
|
||||
g.setDayMajorDateDisplayFormat('dd mon');
|
||||
g.setShowRes(1); // Show/Hide Responsible (0/1)
|
||||
g.setShowDur(1); // Show/Hide Duration (0/1)
|
||||
g.setShowComp(1); // Show/Hide % Complete(0/1)
|
||||
@ -132,7 +132,7 @@ else
|
||||
* Add a gant chart line
|
||||
*
|
||||
* @param string $tarr tarr
|
||||
* @param Task $task Task object
|
||||
* @param array $task Task object
|
||||
* @param Project $project_dependencies Project object
|
||||
* @param int $level Level
|
||||
* @param int $project_id Id of project
|
||||
@ -148,7 +148,7 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
// Resources
|
||||
$resources = $task["task_resources"];
|
||||
// Define depend (ex: "", "4,13", ...)
|
||||
$depend = "\"";
|
||||
$depend = '';
|
||||
$count = 0;
|
||||
foreach ($project_dependencies as $value) {
|
||||
// Not yet used project_dependencies = array(array(0=>idtask,1=>idtasktofinishfisrt))
|
||||
@ -157,7 +157,7 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
$count ++;
|
||||
}
|
||||
}
|
||||
$depend .= "\"";
|
||||
// $depend .= "\"";
|
||||
// Define parent
|
||||
if ($project_id && $level < 0)
|
||||
$parent = 'p'.$project_id;
|
||||
@ -170,9 +170,9 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
|
||||
// Name
|
||||
$name=$task['task_name'];
|
||||
for($i=0; $i < $level; $i++) {
|
||||
$name=' '.$name;
|
||||
}
|
||||
/*for($i=0; $i < $level; $i++) {
|
||||
$name=' - '.$name;
|
||||
}*/
|
||||
// Add line to gantt
|
||||
/*
|
||||
g.AddTaskItem(new JSGantt.TaskItem(1, 'Define Chart API','', '', 'ggroupblack','', 0, 'Brian', 0, 1,0,1,'','','Some Notes text',g));
|
||||
@ -199,12 +199,12 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
<dt>pGantt</dt><dd>(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to "g" for backwards compatibility</dd>
|
||||
*/
|
||||
|
||||
$note="";
|
||||
//$note="";
|
||||
|
||||
$s = "\n// Add taks id=".$task["task_id"]." level = ".$level."\n";
|
||||
$s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js($name)."','".$start_date."', '".$end_date."', '".$task['task_color']."', '".$link."', ".$task['task_milestone'].", '".$resources."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]>0?1:0).", '".$parent."', 1, '".($depend?$depend:"")."', '".$note."'));";
|
||||
// $s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js($name)."','".$start_date."', '".$end_date."', '".$task['task_color']."', '".$link."', ".$task['task_milestone'].", '".$resources."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]>0?1:0).", '".$parent."', 1, '".($depend?$depend:"")."', '".$note."'));";
|
||||
// For JSGanttImproved
|
||||
//$s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js($name)."','".$start_date."', '".$end_date."', 'gtaskblue', '".$link."', ".$task['task_milestone'].", '".$resources."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]>0?1:0).", '".$parent."', 1, '".($depend?$depend:"")."', '".$note."'));";
|
||||
$s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js(trim($name))."','".$start_date."', '".$end_date."', '".$task['task_css']."', '".$link."', ".$task['task_milestone'].", '".$resources."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]).", '".$parent."', 1, '".($depend?$depend:$parent."SS")."', '".($percent >= 0 ? $percent.'%' : '0%')."','".$task['note']."'));";
|
||||
echo $s;
|
||||
|
||||
|
||||
|
||||
@ -206,8 +206,18 @@ if (count($tasksarray)>0)
|
||||
$task->fetch($val->id);
|
||||
$tasks[$taskcursor]['task_id']=$val->id;
|
||||
$tasks[$taskcursor]['task_parent']=$val->fk_parent;
|
||||
$tasks[$taskcursor]['task_is_group']=0;
|
||||
$tasks[$taskcursor]['task_milestone']=0;
|
||||
$tasks[$taskcursor]['task_is_group'] = 0;
|
||||
$tasks[$taskcursor]['task_css'] = 'gtaskblue';
|
||||
|
||||
if($val->fk_parent > 0 && $task->hasChildren()> 0){
|
||||
$tasks[$taskcursor]['task_is_group']=1;
|
||||
$tasks[$taskcursor]['task_css'] = 'gtaskred';
|
||||
}
|
||||
elseif($task->hasChildren()> 0) {
|
||||
$tasks[$taskcursor]['task_is_group'] = 1;
|
||||
$tasks[$taskcursor]['task_css'] = 'gtaskgreen';
|
||||
}
|
||||
$tasks[$taskcursor]['task_milestone']='0';
|
||||
$tasks[$taskcursor]['task_percent_complete']=$val->progress;
|
||||
//$tasks[$taskcursor]['task_name']=$task->getNomUrl(1);
|
||||
//print dol_print_date($val->date_start).dol_print_date($val->date_end).'<br>'."\n";
|
||||
@ -217,7 +227,7 @@ if (count($tasksarray)>0)
|
||||
$tasks[$taskcursor]['task_color']='b4d1ea';
|
||||
$idofusers=$task->getListContactId('internal');
|
||||
$idofthirdparty=$task->getListContactId('external');
|
||||
$s='';
|
||||
$s='';
|
||||
if (count($idofusers)>0)
|
||||
{
|
||||
$s.=$langs->trans("Internals").': ';
|
||||
@ -225,12 +235,12 @@ if (count($tasksarray)>0)
|
||||
foreach($idofusers as $valid)
|
||||
{
|
||||
$userstatic->fetch($valid);
|
||||
if ($i) $s.=',';
|
||||
if ($i) $s.=', ';
|
||||
$s.=$userstatic->login;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if (count($idofusers)>0 && (count($idofthirdparty)>0)) $s.=' - ';
|
||||
//if (count($idofusers)>0 && (count($idofthirdparty)>0)) $s.=' - ';
|
||||
if (count($idofthirdparty)>0)
|
||||
{
|
||||
if ($s) $s.=' - ';
|
||||
@ -244,18 +254,21 @@ if (count($tasksarray)>0)
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if ($s) $tasks[$taskcursor]['task_resources']='<a href="'.DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$val->id.'&withproject=1" title="'.dol_escape_htmltag($s).'">'.$langs->trans("List").'</a>';
|
||||
/* For JSGanttImproved if ($s) $tasks[$taskcursor]['task_resources']=join(',',$idofusers); */
|
||||
//if ($s) $tasks[$taskcursor]['task_resources']='<a href="'.DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$val->id.'&withproject=1" title="'.dol_escape_htmltag($s).'">'.$langs->trans("List").'</a>';
|
||||
/* For JSGanttImproved */
|
||||
//if ($s) $tasks[$taskcursor]['task_resources']=implode(',',$idofusers);
|
||||
$tasks[$taskcursor]['task_resources'] = $s;
|
||||
//print "xxx".$val->id.$tasks[$taskcursor]['task_resources'];
|
||||
$tasks[$taskcursor]['note']=$task->note_public;
|
||||
$taskcursor++;
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
//var_dump($_SESSION);
|
||||
print '<div id="tabs" class="ganttcontainer" style="border: 1px solid #ACACAC;">'."\n";
|
||||
print '<div id="tabs" class="gantt" style="width: 80vw;border: 1px solid #ACACAC;">'."\n";
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.inc.php';
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
@ -32,44 +32,29 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
|
||||
require_once '../main.inc.php';
|
||||
require_once __DIR__.'/../main.inc.php';
|
||||
|
||||
// Define css type
|
||||
header('Content-type: text/javascript');
|
||||
|
||||
global $langs;
|
||||
?>
|
||||
var i18n = new Array();
|
||||
i18n["sMinute"]= "<?php echo $langs->transnoentities("Minute") ?>";
|
||||
i18n["sMinutes"]= "<?php echo $langs->transnoentities("Minutes") ?>";
|
||||
i18n["sHour"]= "<?php echo $langs->transnoentities("Hour") ?>";
|
||||
i18n["sHours"]= "<?php echo $langs->transnoentities("Hours") ?>";
|
||||
i18n["sDay"]= "<?php echo $langs->transnoentities("Day") ?>";
|
||||
i18n["sDays"]= "<?php echo $langs->transnoentities("Days") ?>";
|
||||
i18n["sWeek"] = "<?php echo $langs->transnoentities("Week") ?>";
|
||||
i18n["sMonth"] = "<?php echo $langs->transnoentities("Month") ?>";
|
||||
i18n["sQuarter"] = "<?php echo $langs->transnoentities("Quadri") ?>";
|
||||
i18n["View"] = "<?php echo $langs->transnoentities("View") ?>";
|
||||
i18n["Resource"] = "<?php echo $langs->transnoentities("Resources") ?>";
|
||||
i18n["Duration"] = "<?php echo $langs->transnoentities("Duration") ?>";
|
||||
i18n["Start_Date"] = "<?php echo $langs->transnoentities("DateStart") ?>";
|
||||
i18n["End_Date"] = "<?php echo $langs->transnoentities("DateEnd") ?>";
|
||||
i18n["Date_Format"] = "<?php echo $langs->transnoentities("Format") ?>";
|
||||
i18n["January"] = "<?php echo $langs->transnoentities("January") ?>";
|
||||
i18n["February"] = "<?php echo $langs->transnoentities("February") ?>";
|
||||
i18n["March"] = "<?php echo $langs->transnoentities("March") ?>";
|
||||
i18n["April"] = "<?php echo $langs->transnoentities("April") ?>";
|
||||
i18n["May"] = "<?php echo $langs->transnoentities("May") ?>";
|
||||
i18n["June"] = "<?php echo $langs->transnoentities("June") ?>";
|
||||
i18n["July"] = "<?php echo $langs->transnoentities("July") ?>";
|
||||
i18n["August"] = "<?php echo $langs->transnoentities("August") ?>";
|
||||
i18n["September"] = "<?php echo $langs->transnoentities("Septembre") ?>";
|
||||
i18n["October"] = "<?php echo $langs->transnoentities("October") ?>";
|
||||
i18n["November"] = "<?php echo $langs->transnoentities("November") ?>";
|
||||
i18n["December"] = "<?php echo $langs->transnoentities("December") ?>";
|
||||
i18n["Quarter"] = "<?php echo $langs->transnoentities("Quarter") ?>";
|
||||
i18n["Period"] = "<?php echo $langs->transnoentities("Period") ?>";
|
||||
|
||||
|
||||
var vLangs={'<?php print $langs->getDefaultLang(1);?>':
|
||||
{'format':'<?php print $langs->transnoentities('Periodo');?>','hour':'"<?php print $langs->transnoentities('Hour'); ?>','day':'<?php print $langs->transnoentities('Day'); ?>',
|
||||
'week':'<?php print $langs->transnoentities('Week'); ?>','month':'<?php print $langs->transnoentities('Month'); ?>','quarter':'<?php print $langs->transnoentities('Quadri'); ?>',
|
||||
'hours':'<?php print $langs->transnoentities('Hours'); ?>','days':'<?php print $langs->transnoentities('Days'); ?>','weeks':'<?php print $langs->transnoentities('Weeks');?>',
|
||||
'months':'<?php print $langs->transnoentities('Months'); ?>','quarters':'<?php print $langs->transnoentities('Quadri'); ?>','hr':'Hr','dy':'<?php print $langs->transnoentities('Day'); ?>','wk':'<?php print $langs->transnoentities('Week'); ?>','mth':'<?php print $langs->transnoentities('Month'); ?>','qtr':'<?php print $langs->transnoentities('Quadri'); ?>','hrs':'<?php print $langs->transnoentities('Hours'); ?>',
|
||||
'dys':'<?php print $langs->transnoentities('Days'); ?>','wks':'<?php print $langs->transnoentities('Weeks'); ?>','mths':'<?php print $langs->transnoentities('Months'); ?>','qtrs':'<?php print $langs->transnoentities('Quadri'); ?>','resource':'<?php print $langs->transnoentities('Resources'); ?>','duration':'<?php print $langs->transnoentities('Duration'); ?>','comp':'% <?php print $langs->transnoentities('Total'); ?>',
|
||||
'completion':'<?php print $langs->transnoentities('Total'); ?>','startdate':'<?php print $langs->transnoentities('DateStart'); ?>','enddate':'<?php print $langs->transnoentities('DateEnd'); ?>','moreinfo':'<?php print $langs->transnoentities('MoreInformation'); ?>',
|
||||
'notes':'<?php print $langs->transnoentities('NotePublic'); ?>',
|
||||
'january':'<?php print $langs->transnoentities('January'); ?>','february':'<?php print $langs->transnoentities('February'); ?>','march':'<?php print $langs->transnoentities('March'); ?>','april':'<?php print $langs->transnoentities('April'); ?>','maylong':'<?php print $langs->transnoentities('May'); ?>','june':'<?php print $langs->transnoentities('June'); ?>','july':'<?php print $langs->transnoentities('July'); ?>',
|
||||
'august':'<?php print $langs->transnoentities('August'); ?>','september':'<?php print $langs->transnoentities('September'); ?>','october':'<?php print $langs->transnoentities('October'); ?>','november':'<?php print $langs->transnoentities('November'); ?>','december':'<?php print $langs->transnoentities('December'); ?>',
|
||||
'jan':'<?php print $langs->transnoentities('JanuaryMin'); ?>','feb':'<?php print $langs->transnoentities('FebruaryMin'); ?>','mar':'<?php print $langs->transnoentities('MarchMin'); ?>','apr':'<?php print $langs->transnoentities('AprilMin'); ?>','may':'<?php print $langs->transnoentities('MayMin'); ?>','jun':'<?php print $langs->transnoentities('JuneMin'); ?>','jul':'<?php print $langs->transnoentities('JulyMin'); ?>',
|
||||
'aug':'<?php print $langs->transnoentities('AugustMin'); ?>','sep':'<?php print $langs->transnoentities('SeptemberMin'); ?>','oct':'<?php print $langs->transnoentities('OctoberMin'); ?>','nov':'<?php print $langs->transnoentities('NovemberMin'); ?>','dec':'<?php print $langs->transnoentities('DecemberMin'); ?>',
|
||||
'sunday':'<?php print $langs->transnoentities('Sunday'); ?>','monday':'<?php print $langs->transnoentities('Monday'); ?>','tuesday':'<?php print $langs->transnoentities('Tuesday'); ?>','wednesday':'<?php print $langs->transnoentities('Wednesday'); ?>','thursday':'<?php print $langs->transnoentities('Thursday'); ?>','friday':'<?php print $langs->transnoentities('Friday'); ?>','saturday':'<?php print $langs->transnoentities('Saturday'); ?>',
|
||||
'sun':'<?php print $langs->transnoentities('SundayMin'); ?>','mon':'<?php print $langs->transnoentities('MondayMin'); ?>','tue':'<?php print $langs->transnoentities('TuesdayMin'); ?>','wed':'<?php print $langs->transnoentities('WednesdayMin'); ?>','thu':'<?php print $langs->transnoentities('ThursdayMin'); ?>','fri':'<?php print $langs->transnoentities('FridayMin'); ?>','sat':'<?php print $langs->transnoentities('SaturdayMin'); ?>'}
|
||||
};
|
||||
var vLang='<?php print $langs->getDefaultLang(1);?>';
|
||||
<?php
|
||||
if (is_object($db)) $db->close();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user