|
31 | 31 | $tpl->dispatchTplEvent('filters.beforeLefthandSectionClose');
|
32 | 32 | ?>
|
33 | 33 | </div>
|
34 |
| - <div class="col-md-4"> |
| 34 | + <div class="col-md-4 p-2"> |
35 | 35 | <div class="fc-center center" id="calendarTitle" style="padding-top:5px;">
|
36 | 36 | <h2>..</h2>
|
37 | 37 | </div>
|
38 | 38 | </div>
|
39 |
| - <div class="col-md-4"> |
| 39 | + <div class="col-md-4 p-2"> |
40 | 40 |
|
41 |
| - <x-global::forms.button |
42 |
| - type="button" |
43 |
| - class="right" |
44 |
| - style="margin-right:5px;" |
45 |
| - content-role='secondary' |
| 41 | + <x-global::forms.button |
| 42 | + type="button" |
| 43 | + class="fc-next-button right" |
| 44 | + style="margin-right:5px;" |
| 45 | + content-role='secondary' |
46 | 46 | >
|
47 |
| - <span class="fc-icon fc-icon-chevron-right"></span> |
48 |
| - </x-global::forms.button> |
49 |
| - |
50 |
| - <x-global::forms.button |
51 |
| - type="button" |
52 |
| - class="right" |
53 |
| - style="margin-right:5px;" |
54 |
| - content-role='secondary' |
55 |
| - |
| 47 | + <span class="fc-icon fc-icon-chevron-right"></span> |
| 48 | + </x-global::forms.button> |
| 49 | + |
| 50 | + <x-global::forms.button |
| 51 | + type="button" |
| 52 | + class="fc-prev-button right" |
| 53 | + style="margin-right:5px;" |
| 54 | + content-role='secondary' |
56 | 55 | >
|
57 |
| - <span class="fc-icon fc-icon-chevron-left"></span> |
58 |
| - </x-global::forms.button> |
59 |
| - |
60 |
| - <x-global::forms.button |
61 |
| - type="button" |
62 |
| - class="fc-today-button btn btn-default right" |
63 |
| - style="margin-right:5px;"> |
64 |
| - today |
65 |
| - </x-global::forms.button> |
66 |
| - |
67 |
| - |
68 |
| - <x-global::forms.select class="right" id="my-select"> |
69 |
| - <x-global::forms.select.select-option |
70 |
| - value="timeGridDay" |
71 |
| - :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'timeGridDay'"> |
72 |
| - Day |
73 |
| - </x-global::forms.select.select-option> |
74 |
| - |
75 |
| - <x-global::forms.select.select-option |
76 |
| - value="timeGridWeek" |
77 |
| - :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'timeGridWeek'"> |
78 |
| - Week |
79 |
| - </x-global::forms.select.select-option> |
80 |
| - |
81 |
| - <x-global::forms.select.select-option |
82 |
| - value="dayGridMonth" |
83 |
| - :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'dayGridMonth'"> |
84 |
| - Month |
85 |
| - </x-global::forms.select.select-option> |
86 |
| - |
87 |
| - <x-global::forms.select.select-option |
88 |
| - value="multiMonthYear" |
89 |
| - :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'multiMonthYear'"> |
90 |
| - Year |
91 |
| - </x-global::forms.select.select-option> |
92 |
| - </x-global::forms.select> |
| 56 | + <span class="fc-icon fc-icon-chevron-left"></span> |
| 57 | + </x-global::forms.button> |
| 58 | + |
| 59 | + <x-global::forms.button |
| 60 | + type="button" |
| 61 | + class="fc-today-button right" |
| 62 | + style="margin-right:5px;" |
| 63 | + content-role='secondary' |
| 64 | + > |
| 65 | + today |
| 66 | + </x-global::forms.button> |
| 67 | + |
| 68 | + |
| 69 | + <x-global::forms.select class="right" id="my-select" style="margin-right:5px;"> |
| 70 | + <x-global::forms.select.select-option |
| 71 | + value="timeGridDay" |
| 72 | + :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'timeGridDay'"> |
| 73 | + Day |
| 74 | + </x-global::forms.select.select-option> |
| 75 | + |
| 76 | + <x-global::forms.select.select-option |
| 77 | + value="timeGridWeek" |
| 78 | + :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'timeGridWeek'"> |
| 79 | + Week |
| 80 | + </x-global::forms.select.select-option> |
| 81 | + |
| 82 | + <x-global::forms.select.select-option |
| 83 | + value="dayGridMonth" |
| 84 | + :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'dayGridMonth'"> |
| 85 | + Month |
| 86 | + </x-global::forms.select.select-option> |
| 87 | + |
| 88 | + <x-global::forms.select.select-option |
| 89 | + value="multiMonthYear" |
| 90 | + :selected="session('usersettings.submenuToggle.myProjectCalendarView') == 'multiMonthYear'"> |
| 91 | + Year |
| 92 | + </x-global::forms.select.select-option> |
| 93 | + </x-global::forms.select> |
93 | 94 |
|
94 | 95 |
|
95 | 96 | </div>
|
@@ -122,78 +123,71 @@ class="fc-today-button btn btn-default right"
|
122 | 123 | <?php } ?>
|
123 | 124 |
|
124 | 125 |
|
125 |
| - }); |
| 126 | + var events = [ |
| 127 | + <?php foreach ($milestones as $mlst) : |
| 128 | + $headline = $tpl->__('label.' . strtolower($mlst->type)) . ": " . $mlst->headline; |
| 129 | + if ($mlst->type == "milestone") { |
| 130 | + $headline .= " (" . $mlst->percentDone . "% Done)"; |
| 131 | + } |
126 | 132 |
|
| 133 | + $color = "#8D99A6"; |
| 134 | + if ($mlst->type == "milestone") { |
| 135 | + $color = $mlst->tags; |
| 136 | + } |
127 | 137 |
|
128 |
| - var events = [ |
129 |
| - <?php foreach ($milestones as $mlst) : |
130 |
| - $headline = $tpl->__('label.' . strtolower($mlst->type)) . ": " . $mlst->headline; |
131 |
| - if ($mlst->type == "milestone") { |
132 |
| - $headline .= " (" . $mlst->percentDone . "% Done)"; |
133 |
| - } |
| 138 | + $sortIndex = 0; |
| 139 | + if ($mlst->sortIndex != '' && is_numeric($mlst->sortIndex)) { |
| 140 | + $sortIndex = $mlst->sortIndex; |
| 141 | + } |
134 | 142 |
|
135 |
| - $color = "#8D99A6"; |
136 |
| - if ($mlst->type == "milestone") { |
137 |
| - $color = $mlst->tags; |
138 |
| - } |
| 143 | + $dependencyList = array(); |
| 144 | + if ($mlst->milestoneid != 0) { |
| 145 | + $dependencyList[] = $mlst->milestoneid; |
| 146 | + } |
139 | 147 |
|
140 |
| - $sortIndex = 0; |
141 |
| - if ($mlst->sortIndex != '' && is_numeric($mlst->sortIndex)) { |
142 |
| - $sortIndex = $mlst->sortIndex; |
143 |
| - } |
144 |
| -
|
145 |
| - $dependencyList = array(); |
146 |
| - if ($mlst->milestoneid != 0) { |
147 |
| - $dependencyList[] = $mlst->milestoneid; |
148 |
| - } |
149 |
| -
|
150 |
| - if ($mlst->dependingTicketId != 0) { |
151 |
| - $dependencyList[] = $mlst->dependingTicketId; |
152 |
| - } |
| 148 | + if ($mlst->dependingTicketId != 0) { |
| 149 | + $dependencyList[] = $mlst->dependingTicketId; |
| 150 | + } |
153 | 151 |
|
154 | 152 |
|
155 |
| - ?> |
156 |
| -
|
157 |
| - { |
158 |
| -
|
159 |
| - title: <?php echo json_encode($headline); ?>, |
| 153 | + ?> |
160 | 154 |
|
161 |
| - <?php if(dtHelper()->isValidDateString($mlst->dateToFinish)){ ?> |
162 |
| - start: new Date(<?php echo format($mlst->dateToFinish)->jsTimestamp() ?>), |
163 |
| - end: new Date(<?php echo format(dtHelper()->parseDbDateTime($mlst->dateToFinish)->addHour(1))->jsTimestamp() ?>), |
164 |
| - <?php } elseif(dtHelper()->isValidDateString($mlst->editFrom)){ ?> |
165 |
| - start: new Date(<?php echo format($mlst->editFrom)->jsTimestamp() ?>), |
166 |
| - end: new Date(<?php echo format($mlst->editTo)->jsTimestamp() ?>), |
167 |
| - <?php } ?> |
| 155 | + { |
168 | 156 |
|
| 157 | + title: <?php echo json_encode($headline); ?>, |
169 | 158 |
|
170 |
| - enitityId: <?php echo $mlst->id ?>, |
171 |
| - <?php if ($mlst->type == "milestone") { ?> |
172 |
| - url: '#/tickets/editMilestone/<?php echo $mlst->id ?>', |
173 |
| - color: '<?=$color?>', |
174 |
| - enitityType: "milestone", |
175 |
| - allDay: true, |
176 |
| - <?php } else { ?> |
177 |
| - url: '#/tickets/showTicket/<?php echo $mlst->id ?>', |
178 |
| - color: '<?=$color?>', |
179 |
| - enitityType: "ticket", |
180 |
| - allDay: false, |
181 |
| - <?php } ?> |
| 159 | + <?php if(dtHelper()->isValidDateString($mlst->dateToFinish)){ ?> |
| 160 | + start: new Date(<?php echo format($mlst->dateToFinish)->jsTimestamp() ?>), |
| 161 | + end: new Date(<?php echo format(dtHelper()->parseDbDateTime($mlst->dateToFinish)->addHour(1))->jsTimestamp() ?>), |
| 162 | + <?php } elseif(dtHelper()->isValidDateString($mlst->editFrom)){ ?> |
| 163 | + start: new Date(<?php echo format($mlst->editFrom)->jsTimestamp() ?>), |
| 164 | + end: new Date(<?php echo format($mlst->editTo)->jsTimestamp() ?>), |
| 165 | + <?php } ?> |
182 | 166 |
|
183 |
| - }, |
184 |
| - <?php endforeach; ?> |
185 |
| - ]; |
186 | 167 |
|
| 168 | + enitityId: <?php echo $mlst->id ?>, |
| 169 | + <?php if ($mlst->type == "milestone") { ?> |
| 170 | + url: '#/tickets/editMilestone/<?php echo $mlst->id ?>', |
| 171 | + color: '<?=$color?>', |
| 172 | + enitityType: "milestone", |
| 173 | + allDay: true, |
| 174 | + <?php } else { ?> |
| 175 | + url: '#/tickets/showTicket/<?php echo $mlst->id ?>', |
| 176 | + color: '<?=$color?>', |
| 177 | + enitityType: "ticket", |
| 178 | + allDay: false, |
| 179 | + <?php } ?> |
187 | 180 |
|
| 181 | + }, |
| 182 | + <?php endforeach; ?> |
| 183 | + ]; |
188 | 184 |
|
189 |
| - document.addEventListener('DOMContentLoaded', function () { |
190 | 185 | calendarController.initTicketsCalendar(
|
191 | 186 | document.getElementById('calendar'),
|
192 | 187 | '<?=session("usersettings.submenuToggle.myProjectCalendarView") ?>',
|
193 |
| - events, |
| 188 | + events |
194 | 189 | );
|
195 | 190 | });
|
196 | 191 |
|
197 |
| -
|
198 | 192 | </script>
|
199 | 193 | @endsection
|
0 commit comments