This commit is contained in:
MatteoPistorello 2021-11-15 12:02:23 +01:00
commit 2be6609dbe
2 changed files with 29 additions and 2 deletions

View File

@ -101,7 +101,7 @@ switch (filter('op')) {
'title' => '<div style=\'position:absolute; top:7%; right:3%;\' > '.(($sessione['is_completato']) ? '<i class="fa fa-lock" aria-hidden="true"></i>' : '').' '.(($sessione['have_attachments']) ? '<i class="fa fa-paperclip" aria-hidden="true"></i>' : '').'</div>'.'<b>Int. '.$sessione['codice'].'</b> '.$sessione['cliente'].'<br><b>'.tr('Tecnici').':</b> '.$sessione['nome_tecnico'],
'start' => $sessione['orario_inizio'],
'end' => $sessione['orario_fine'],
'url' => base_path().'/editor.php?id_module='.$modulo_interventi->id.'&id_record='.$sessione['idintervento'],
'link' => base_path().'/editor.php?id_module='.$modulo_interventi->id.'&id_record='.$sessione['idintervento'],
'backgroundColor' => $sessione['colore'],
'textColor' => color_inverse($sessione['colore']),
'borderColor' => ($sessione['colore_tecnico'] == '#FFFFFF') ? color_darken($sessione['colore_tecnico'], 100) : $sessione['colore_tecnico'],

View File

@ -501,6 +501,7 @@ echo '
function create_calendar() {
var calendarElement = document.getElementById("calendar");
var clickCnt = 0;
var calendar = $(calendarElement).fullCalendar({
/* plugins: [interactionPlugin, dayGridPlugin, timeGridPlugin], */
@ -633,8 +634,34 @@ echo '
}
});
},
},';
if(isMobile() && setting('Utilizzare i tooltip sul calendario')){
echo '
eventClick: function(info) {
let link = info.link;
let element = $(this);
clickCnt++;
if (clickCnt === 1) {
oneClickTimer = setTimeout(function() {
clickCnt = 0;
element.trigger("mouseenter");
}, 400);
} else if (clickCnt === 2) {
clearTimeout(oneClickTimer);
clickCnt = 0;
location.href = link;
}
},';
}else{
echo '
eventClick: function(info) {
let link = info.link;
location.href = link;
},';
}
echo '
// eventPositioned: function (info) {
eventAfterRender: function (event, element) {
// let event = info.event;