Skip to content

Commit 3348a42

Browse files
authored
Merge pull request #351 from dano19/master
Different class for planned task
2 parents 674a677 + 090c970 commit 3348a42

File tree

14 files changed

+6553
-5469
lines changed

14 files changed

+6553
-5469
lines changed

Documentation.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ g.AddTaskItem(new JSGantt.TaskItem(1, 'Define Chart API','', '',
7373
7474
7575
Method definition:
76-
**TaskItem(_pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt_, pCost = null, pPlanStart = null, pPlanEnd = null, pDuration = null, pBarText = null, pDataObject = null)**
76+
**TaskItem(_pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt_, pCost = null, pPlanStart = null, pPlanEnd = null, pDuration = null, pBarText = null, pDataObject = null, pPlanClass = null)**
7777
7878
This method takes only the variables defined above and explained below. You can **NOT** pass custom variables this way.
7979
@@ -98,7 +98,8 @@ This method takes only the variables defined above and explained below. You can
9898
|_pNotes:_|(optional) Detailed task information that will be displayed in tool tip for this task|
9999
|_pGantt:_|(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to "g" for backwards compatibility|
100100
|_pCost:_| cost of that task, numeric
101-
|_pBarText:_|(optional) Use to include text inside a task bar|
101+
|_pBarText:_|(optional) Use to include text inside a task bar|
102+
|_pPlanClass:_|(optional) the css class for planned date of this task
102103
103104
<sup>*</sup> Combined group tasks show all sub-tasks on one row. The information displayed in the task list and row caption are taken from the parent task. Tool tips are generated individually for each sub-task from its own information. Milestones are not valid as sub-tasks of a combined group task and will not be displayed. No bounds checking of start and end dates of sub-tasks is performed therefore it is possible for these task bars to overlap. Dependencies can be set to and from sub-tasks only.
104105
@@ -175,6 +176,7 @@ The structure of the native XML file:
175176
<pDepend>2,24</pDepend>
176177
<pCaption>A caption</pCaption>
177178
<pNotes>Text - can include limited HTML</pNotes>
179+
<pPlanClass>gtaskblue</pPlanClass>
178180
</task>
179181
</project>
180182
```

dist/jsgantt.css

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
div.gantt {
44
font-family: tahoma, arial, verdana, Sans-serif;
5-
font-size: 10px;
5+
font-size: 12px;
66
color: #656565;
77
}
88

@@ -31,10 +31,9 @@ div.gantt {
3131
font-size: 12px;
3232
border: #efefef 1px solid;
3333
text-align: center;
34-
cursor: default
34+
cursor: default;
3535
}
3636

37-
3837
.gtasklist {
3938
height: 19px;
4039
min-width: 5px;
@@ -44,7 +43,7 @@ div.gantt {
4443
border-right: none;
4544
}
4645

47-
.gtasknolist-label{
46+
.gtasknolist-label {
4847
padding: 10px 50px;
4948
}
5049
/* all three width values set just to make sure - helps resizing code */
@@ -56,7 +55,7 @@ div.gantt {
5655
.gminorheading {
5756
background-color: #ffffff;
5857
font-weight: bold;
59-
font-size: 9px;
58+
font-size: 11px;
6059
white-space: nowrap;
6160
}
6261

@@ -154,9 +153,9 @@ td.gspanning {
154153

155154
.gtaskname {
156155
min-width: 170px;
157-
max-width: 170px;
158-
width: 170px;
159-
font-size: 9px;
156+
max-width: 220px;
157+
width: 220px;
158+
font-size: 12px;
160159
border-left: none;
161160
}
162161

@@ -246,6 +245,11 @@ span.gfoldercollapse {
246245
background-color: #fffde5;
247246
}
248247

248+
.gitemdifferent td {
249+
background-image: none;
250+
background-color: rgba(0, 0, 0, 0.05);
251+
}
252+
249253
/* task bar caption text styles */
250254

251255
.gmilecaption,
@@ -487,7 +491,7 @@ span.gfoldercollapse {
487491
div.gtaskbarcontainer {
488492
z-index: 1;
489493
position: absolute;
490-
top: 0px
494+
top: 0px;
491495
}
492496

493497
.textbar {
@@ -510,7 +514,7 @@ div.gtaskbarcontainer {
510514
font-size: 10px;
511515
display: block;
512516
background: #ffffff;
513-
color: #656565
517+
color: #656565;
514518
}
515519

516520
.gTaskInfo {
@@ -652,7 +656,7 @@ div.gtaskbarcontainer {
652656
/* Old Internet Explorer version hacks */
653657

654658
.gantt {
655-
_height: 100%
659+
_height: 100%;
656660
}
657661

658662
/* otherwise the chart disappears! */
@@ -777,7 +781,6 @@ td.gspanning div {
777781
}
778782

779783
@media print {
780-
781784
/* All your print styles go here */
782785
html,
783786
.gchartgrid {
@@ -795,8 +798,8 @@ td.gspanning div {
795798

796799
/* Hide scrollbar for IE, Edge and Firefox */
797800
.gchartcontainer * {
798-
-ms-overflow-style: none; /* IE and Edge */
799-
scrollbar-width: none; /* Firefox */
801+
-ms-overflow-style: none; /* IE and Edge */
802+
scrollbar-width: none; /* Firefox */
800803
}
801804

802805
/* Hide tool-tip */
@@ -849,7 +852,8 @@ td.gspanning div {
849852

850853
.gmainleft {
851854
overflow: hidden;
852-
flex: 0 0 50%;
855+
flex: 0 0 20%;
856+
min-width: 220px;
853857
/* Allow side to grow and shrink */
854858
flex: 1 0 auto;
855859
}
@@ -957,25 +961,25 @@ td.gspanning div {
957961
}
958962

959963
table {
960-
page-break-after: auto
964+
page-break-after: auto;
961965
}
962966

963967
tr {
964968
page-break-inside: avoid;
965-
page-break-after: auto
969+
page-break-after: auto;
966970
}
967971

968972
td {
969973
page-break-inside: avoid;
970-
page-break-after: auto
974+
page-break-after: auto;
971975
}
972976

973977
thead {
974-
display: table-header-group
978+
display: table-header-group;
975979
}
976980

977981
tfoot {
978-
display: table-footer-group
982+
display: table-footer-group;
979983
}
980984
}
981985

@@ -996,7 +1000,7 @@ td.gspanning div {
9961000
border-radius: 8px;
9971001
border: 2px solid white;
9981002
/* should match background, can't be transparent */
999-
background-color: rgba(0, 0, 0, .5);
1003+
background-color: rgba(0, 0, 0, 0.5);
10001004
}
10011005

10021006
.frame::-webkit-scrollbar-track {
@@ -1009,4 +1013,4 @@ td.gspanning div {
10091013
overflow: scroll;
10101014
-ms-overflow-style: scrollbar;
10111015
display: block;
1012-
}
1016+
}

0 commit comments

Comments
 (0)