Aggiunto in Dashboard sfondo rosso per giorni non lavorativi

This commit is contained in:
Luca 2023-03-28 11:57:23 +02:00
parent 16937e7320
commit 93be92efdf
2 changed files with 41 additions and 12 deletions

View File

@ -1119,12 +1119,6 @@ div.tip {
opacity: 0.5;
}
/* Stile Fullcalendar per weekend */
.fc-day-sat,
.fc-day-sun {
background-color: rgba(255,49,21,.3) !important;
}
.login-box .img-responsive {
padding: 18px 0px 4px;
}
@ -1222,4 +1216,13 @@ input[type="radio"] {
.widget-user .widget-user-image>img {
-webkit-box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
}
}
/*
* Colore eventi fullcalendar
*/
.fc .fc-bg-event {
background: rgba(255, 49, 21, .5) !important;
}

View File

@ -339,6 +339,24 @@ if ($vista == 'mese') {
$def = 'listWeek';
}
$days = [
1 => 'Lunedì',
2 => 'Martedì',
3 => 'Mercoledì',
4 => 'Giovedì',
5 => 'Venerdì',
6 => 'Sabato',
0 => 'Domenica'
];
$working_days = explode(",",setting('Giorni lavorativi'));
$non_working_days = [];
foreach ($days as $key => $day) {
if (!in_array($day, $working_days)) {
array_push($non_working_days, $key);
}
}
$modulo_interventi = Modules::get('Interventi');
echo '
@ -687,10 +705,10 @@ echo '
eventDidMount: function(info){
let element = $(info.el);
let id_record = info.event.extendedProps.idintervento;
if (globals.dashboard.tooltip == 1) {
if (globals.dashboard.tooltip == 1 && element[0].childElementCount > 0 ) {
element.tooltipster({
content: globals.translations.loading + "...",
animation: "grow",
@ -713,9 +731,10 @@ echo '
id_record: id_record,
allDay: info.event.allDay,
}, function (data, response) {
instance.content(data);
$origin.data("loaded", true);
if (data !== "") {
instance.content(data);
$origin.data("loaded", true);
}
});
}
}
@ -732,6 +751,13 @@ echo '
}
});
calendar.addEvent({
daysOfWeek: "'.implode(',', $non_working_days).'",
display: "background",
overlap: true,
allDay: true
});
calendar.render();
globals.dashboard.calendar = calendar;