diff --git a/modules/dashboard/ajax.php b/modules/dashboard/ajax.php index 9211e32ad..910170843 100644 --- a/modules/dashboard/ajax.php +++ b/modules/dashboard/ajax.php @@ -101,7 +101,7 @@ switch (filter('op')) { 'title' => '
'.(($sessione['is_completato']) ? '' : '').' '.(($sessione['have_attachments']) ? '' : '').'
'.'Int. '.$sessione['codice'].' '.$sessione['cliente'].'
'.tr('Tecnici').': '.$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'], diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index 7a0db56be..885150bed 100755 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -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;