jsgantt-improved 2.8.4 → 2.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Documentation.md +5 -2
- package/README.md +24 -2
- package/dist/jsgantt.css +26 -22
- package/dist/jsgantt.js +1133 -1038
- package/dist/src/draw.js +226 -227
- package/dist/src/draw.js.map +1 -1
- package/dist/src/json.js +6 -1
- package/dist/src/json.js.map +1 -1
- package/dist/src/lang.js +948 -873
- package/dist/src/lang.js.map +1 -1
- package/dist/src/options.js +6 -0
- package/dist/src/options.js.map +1 -1
- package/dist/src/task.js +8 -3
- package/dist/src/task.js.map +1 -1
- package/dist/src/utils/general_utils.js +3 -2
- package/dist/src/utils/general_utils.js.map +1 -1
- package/dist/src/xml.js +6 -2
- package/dist/src/xml.js.map +1 -1
- package/docs/demo-plan-color.html +282 -0
- package/docs/demo.html +273 -275
- package/docs/fixes/data-plan-color.json +177 -0
- package/docs/index.js +266 -278
- package/docs/project.xml +1 -0
- package/package.json +49 -49
- package/src/jsgantt.css +26 -22
- package/tsconfig.json +26 -26
package/Documentation.md
CHANGED
|
@@ -73,7 +73,7 @@ g.AddTaskItem(new JSGantt.TaskItem(1, 'Define Chart API','', '',
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
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)**
|
|
77
77
|
|
|
78
78
|
This method takes only the variables defined above and explained below. You can **NOT** pass custom variables this way.
|
|
79
79
|
|
|
@@ -98,7 +98,8 @@ This method takes only the variables defined above and explained below. You can
|
|
|
98
98
|
|_pNotes:_|(optional) Detailed task information that will be displayed in tool tip for this task|
|
|
99
99
|
|_pGantt:_|(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to "g" for backwards compatibility|
|
|
100
100
|
|_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
|
|
102
103
|
|
|
103
104
|
<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.
|
|
104
105
|
|
|
@@ -175,6 +176,7 @@ The structure of the native XML file:
|
|
|
175
176
|
<pDepend>2,24</pDepend>
|
|
176
177
|
<pCaption>A caption</pCaption>
|
|
177
178
|
<pNotes>Text - can include limited HTML</pNotes>
|
|
179
|
+
<pPlanClass>gtaskblue</pPlanClass>
|
|
178
180
|
</task>
|
|
179
181
|
</project>
|
|
180
182
|
```
|
|
@@ -306,6 +308,7 @@ The following options take a single numeric parameter; a value of 1 will enable
|
|
|
306
308
|
|_setAdditionalHeaders:_ |Set object with headers values for additional columns . ex : `{ category: { title: 'Category' }` }|
|
|
307
309
|
|_setColumnOrder:_ |Set order of the columns that will be displayed, the default value is : `[ 'vShowRes','vShowDur','vShowComp','vShowStartDate','vShowEndDate','vShowPlanStartDate','vShowPlanEndDate','vShowCost','vAdditionalHeaders','vShowAddEntries']` }|
|
|
308
310
|
|_setResources():_ |Set the list of possible resources, must be an array of objects, ex: `[{ id: 1, name: 'Mario' } , { id: 2, name: 'Henrique' }]`|
|
|
311
|
+
|_setCustomLang():_ |Set custom language vars, ex: `{'january': 'My January text'}`|
|
|
309
312
|
|_setTotalHeight():_ |Set component height as CSS height (e.g. "300px"). If set - the header is fixed and content is scrollable if needed. Otherwise component height is defined by content|
|
|
310
313
|
|_setMinDate():_ |Set minimum date further than minimum task date. It doesn't trim any task if it starts before this minimum date, but can extend the chart to the left. This may be useful if you want to draw some custom elements on the chart or want to fix the time range regardless of the content|
|
|
311
314
|
|_setMaxDate():_ |Similar to _setMinDate()_|
|
package/README.md
CHANGED
|
@@ -125,6 +125,21 @@ g.Draw();
|
|
|
125
125
|
* From external files (including experimental support for MS Project XML files)
|
|
126
126
|
* From JavaScript Strings
|
|
127
127
|
* Support for Internationalization
|
|
128
|
+
* Chinese (cn)
|
|
129
|
+
* Czech (cs)
|
|
130
|
+
* Dutch (Standard)
|
|
131
|
+
* selected>English (en)
|
|
132
|
+
* French (fr)
|
|
133
|
+
* German (de)
|
|
134
|
+
* Hungarian (hu)
|
|
135
|
+
* Indonesian (id)
|
|
136
|
+
* Italian (it)
|
|
137
|
+
* Japanese (ja)
|
|
138
|
+
* Portuguese (pt)
|
|
139
|
+
* Russian (ru)
|
|
140
|
+
* Spanish (es)
|
|
141
|
+
* Swedish (sv)
|
|
142
|
+
* Turkish (tr)
|
|
128
143
|
|
|
129
144
|
## Documentation
|
|
130
145
|
|
|
@@ -139,14 +154,21 @@ Its easy to get it set:
|
|
|
139
154
|
|
|
140
155
|
* Clone this repo
|
|
141
156
|
* Install lib dependencies: `npm i`
|
|
142
|
-
* Install global dependencies: `npm i -g browserify nodemon onchange tsc`
|
|
143
|
-
*
|
|
157
|
+
* Install global dependencies: `npm i -g browserify nodemon onchange tsc`
|
|
158
|
+
* Compile final js to be used on demo: `npm run dist`
|
|
159
|
+
* Run the demo with a live example: `npm start`.
|
|
144
160
|
* You can check the demo gantt that we use for testing features at: `http://127.0.0.1:8080/docs/demo.html`
|
|
145
161
|
* Use `npm run watch` or do your change in `src` and restart this command refresh the changes.
|
|
146
162
|
|
|
147
163
|
For testing:
|
|
148
164
|
* Install global dependencies: `npm i -g webdriver-manager`
|
|
149
165
|
* Install selenium webdriver: `npm run webdriver`, it will install something like node_modules/webdriver-manager/selenium/chromedriver_88.0.4324.96.zip
|
|
166
|
+
|
|
167
|
+
node node_modules/protractor/bin/webdriver-manager update
|
|
168
|
+
apt install chromium
|
|
169
|
+
|
|
170
|
+
apt install chromium-bsu
|
|
171
|
+
|
|
150
172
|
* Use `npm run test` with e2e tests.
|
|
151
173
|
* Or use `npm run watch:test` to keep watching the tests
|
|
152
174
|
|
package/dist/jsgantt.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
div.gantt {
|
|
4
4
|
font-family: tahoma, arial, verdana, Sans-serif;
|
|
5
|
-
font-size:
|
|
5
|
+
font-size: 12px;
|
|
6
6
|
color: #656565;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -31,10 +31,9 @@ div.gantt {
|
|
|
31
31
|
font-size: 12px;
|
|
32
32
|
border: #efefef 1px solid;
|
|
33
33
|
text-align: center;
|
|
34
|
-
cursor: default
|
|
34
|
+
cursor: default;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
38
37
|
.gtasklist {
|
|
39
38
|
height: 19px;
|
|
40
39
|
min-width: 5px;
|
|
@@ -44,7 +43,7 @@ div.gantt {
|
|
|
44
43
|
border-right: none;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
.gtasknolist-label{
|
|
46
|
+
.gtasknolist-label {
|
|
48
47
|
padding: 10px 50px;
|
|
49
48
|
}
|
|
50
49
|
/* all three width values set just to make sure - helps resizing code */
|
|
@@ -56,7 +55,7 @@ div.gantt {
|
|
|
56
55
|
.gminorheading {
|
|
57
56
|
background-color: #ffffff;
|
|
58
57
|
font-weight: bold;
|
|
59
|
-
font-size:
|
|
58
|
+
font-size: 11px;
|
|
60
59
|
white-space: nowrap;
|
|
61
60
|
}
|
|
62
61
|
|
|
@@ -154,9 +153,9 @@ td.gspanning {
|
|
|
154
153
|
|
|
155
154
|
.gtaskname {
|
|
156
155
|
min-width: 170px;
|
|
157
|
-
max-width:
|
|
158
|
-
width:
|
|
159
|
-
font-size:
|
|
156
|
+
max-width: 220px;
|
|
157
|
+
width: 220px;
|
|
158
|
+
font-size: 12px;
|
|
160
159
|
border-left: none;
|
|
161
160
|
}
|
|
162
161
|
|
|
@@ -246,6 +245,11 @@ span.gfoldercollapse {
|
|
|
246
245
|
background-color: #fffde5;
|
|
247
246
|
}
|
|
248
247
|
|
|
248
|
+
.gitemdifferent td {
|
|
249
|
+
background-image: none;
|
|
250
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
251
|
+
}
|
|
252
|
+
|
|
249
253
|
/* task bar caption text styles */
|
|
250
254
|
|
|
251
255
|
.gmilecaption,
|
|
@@ -487,7 +491,7 @@ span.gfoldercollapse {
|
|
|
487
491
|
div.gtaskbarcontainer {
|
|
488
492
|
z-index: 1;
|
|
489
493
|
position: absolute;
|
|
490
|
-
top: 0px
|
|
494
|
+
top: 0px;
|
|
491
495
|
}
|
|
492
496
|
|
|
493
497
|
.textbar {
|
|
@@ -510,7 +514,7 @@ div.gtaskbarcontainer {
|
|
|
510
514
|
font-size: 10px;
|
|
511
515
|
display: block;
|
|
512
516
|
background: #ffffff;
|
|
513
|
-
color: #656565
|
|
517
|
+
color: #656565;
|
|
514
518
|
}
|
|
515
519
|
|
|
516
520
|
.gTaskInfo {
|
|
@@ -652,7 +656,7 @@ div.gtaskbarcontainer {
|
|
|
652
656
|
/* Old Internet Explorer version hacks */
|
|
653
657
|
|
|
654
658
|
.gantt {
|
|
655
|
-
_height: 100
|
|
659
|
+
_height: 100%;
|
|
656
660
|
}
|
|
657
661
|
|
|
658
662
|
/* otherwise the chart disappears! */
|
|
@@ -777,7 +781,6 @@ td.gspanning div {
|
|
|
777
781
|
}
|
|
778
782
|
|
|
779
783
|
@media print {
|
|
780
|
-
|
|
781
784
|
/* All your print styles go here */
|
|
782
785
|
html,
|
|
783
786
|
.gchartgrid {
|
|
@@ -795,8 +798,8 @@ td.gspanning div {
|
|
|
795
798
|
|
|
796
799
|
/* Hide scrollbar for IE, Edge and Firefox */
|
|
797
800
|
.gchartcontainer * {
|
|
798
|
-
-ms-overflow-style: none;
|
|
799
|
-
scrollbar-width: none;
|
|
801
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
802
|
+
scrollbar-width: none; /* Firefox */
|
|
800
803
|
}
|
|
801
804
|
|
|
802
805
|
/* Hide tool-tip */
|
|
@@ -849,7 +852,8 @@ td.gspanning div {
|
|
|
849
852
|
|
|
850
853
|
.gmainleft {
|
|
851
854
|
overflow: hidden;
|
|
852
|
-
flex: 0 0
|
|
855
|
+
flex: 0 0 20%;
|
|
856
|
+
min-width: 220px;
|
|
853
857
|
/* Allow side to grow and shrink */
|
|
854
858
|
flex: 1 0 auto;
|
|
855
859
|
}
|
|
@@ -957,25 +961,25 @@ td.gspanning div {
|
|
|
957
961
|
}
|
|
958
962
|
|
|
959
963
|
table {
|
|
960
|
-
page-break-after: auto
|
|
964
|
+
page-break-after: auto;
|
|
961
965
|
}
|
|
962
966
|
|
|
963
967
|
tr {
|
|
964
968
|
page-break-inside: avoid;
|
|
965
|
-
page-break-after: auto
|
|
969
|
+
page-break-after: auto;
|
|
966
970
|
}
|
|
967
971
|
|
|
968
972
|
td {
|
|
969
973
|
page-break-inside: avoid;
|
|
970
|
-
page-break-after: auto
|
|
974
|
+
page-break-after: auto;
|
|
971
975
|
}
|
|
972
976
|
|
|
973
977
|
thead {
|
|
974
|
-
display: table-header-group
|
|
978
|
+
display: table-header-group;
|
|
975
979
|
}
|
|
976
980
|
|
|
977
981
|
tfoot {
|
|
978
|
-
display: table-footer-group
|
|
982
|
+
display: table-footer-group;
|
|
979
983
|
}
|
|
980
984
|
}
|
|
981
985
|
|
|
@@ -996,7 +1000,7 @@ td.gspanning div {
|
|
|
996
1000
|
border-radius: 8px;
|
|
997
1001
|
border: 2px solid white;
|
|
998
1002
|
/* should match background, can't be transparent */
|
|
999
|
-
background-color: rgba(0, 0, 0, .5);
|
|
1003
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
1000
1004
|
}
|
|
1001
1005
|
|
|
1002
1006
|
.frame::-webkit-scrollbar-track {
|
|
@@ -1009,4 +1013,4 @@ td.gspanning div {
|
|
|
1009
1013
|
overflow: scroll;
|
|
1010
1014
|
-ms-overflow-style: scrollbar;
|
|
1011
1015
|
display: block;
|
|
1012
|
-
}
|
|
1016
|
+
}
|