feat: Integrate JS Gantt Chart library and update styles

- Added JS Gantt Chart library files including CSS and JS.
- Updated existing Gantt chart styles for better visual representation.
- Translated month and day names to Polish in the Gantt chart settings.
- Implemented Gantt chart initialization in the main view with sample data.
- Added a toggle switch for displaying tasks in the calendar.
- Enhanced task edit form with a new checkbox for calendar visibility.
- Improved the layout of the logged-in user template to include Gantt chart styles and scripts.
This commit is contained in:
2025-04-11 00:26:54 +02:00
parent 39b30c4ea4
commit 1f38807599
21 changed files with 765 additions and 27 deletions

View File

@@ -55,7 +55,7 @@
display: inline-block;
margin: 0 0 0 5px;
color: #484A4D;
width: 110px;
width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
@@ -204,17 +204,36 @@
border-radius: 3px;
}
.fn-gantt .bar.ganttGrey {
background-color: #f0f0f0;
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.25) inset;
-moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.25) inset;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.25) inset;
}
/* ganttRed */
.fn-gantt .bar.ganttRed {
background-color: #772626;
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.25) inset;
-moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.25) inset;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.25) inset;
}
.fn-gantt .bar .fn-label {
line-height: 18px;
font-weight: bold;
font-weight: 400;
white-space: nowrap;
width: 100%;
color: #414B57 !important;
color: #414B57;
text-align: center;
font-size: 11px;
text-indent: 5px;
}
.fn-content .bar.ganttRed .fn-label {
color: #FFF;
}
.fn-gantt .gantt10 {
background-color: #cc0000;
}

View File

@@ -11,8 +11,8 @@
var settings = {
source: [],
itemsPerPage: 7,
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
dow: ["S", "M", "T", "W", "T", "F", "S"],
months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"],
dow: ["N", "P", "W", "Ś", "C", "P", "S"], // Niedziela, Poniedziałek, Wtorek, Środa, Czwartek, Piątek, Sobota
navigate: "buttons",
scale: "days",
useCookie: false,
@@ -1711,11 +1711,22 @@
}
switch (settings.scale) {
//case "hours": this.headerRows = 5; this.scaleStep = 8; break;
case "hours": this.headerRows = 5; this.scaleStep = 12; break;
case "weeks": this.headerRows = 3; this.scaleStep = 13; break;
case "months": this.headerRows = 2; this.scaleStep = 14; break;
default: this.headerRows = 4; this.scaleStep = 13; break;
case "hours":
this.headerRows = 5;
this.scaleStep = settings.scaleStep || 12;
break;
case "weeks":
this.headerRows = 3;
this.scaleStep = settings.scaleStep || 13;
break;
case "months":
this.headerRows = 2;
this.scaleStep = settings.scaleStep || 14;
break;
default:
this.headerRows = 4;
this.scaleStep = settings.scaleStep || 13;
break;
}
this.scrollNavigation = {