From c3f47d2b31ed13e2d4587de1d2e16df95b2ab62e Mon Sep 17 00:00:00 2001 From: loviuz Date: Thu, 26 Jan 2023 23:41:05 +0100 Subject: [PATCH] Rimozione evento trascinato su calendario --- modules/dashboard/edit.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index 3485b8ae8..5739758ab 100755 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -415,10 +415,9 @@ globals.dashboard = { $("#elenco-promemoria").html(data); $("#external-events .fc-event").each(function () { - new Draggable( document.getElementById( $(this).attr("id") ), { - zIndex: 999, + new Draggable( this, { + create: false, revert: true, - revertDuration: 0, eventData: { title: $.trim($(this).text()), stick: false @@ -556,7 +555,6 @@ globals.dashboard = { openModal(globals.dashboard.drop.title, globals.dashboard.drop.url + "&data=" + data + "&orario_inizio=" + ora_dal + "&orario_fine=" + ora_al + "&ref=dashboard&idcontratto=" + info.draggedEl.dataset.idcontratto + "&" + name + "=" + info.draggedEl.dataset.id + "&id_tecnico=" + info.draggedEl.dataset.id_tecnico); // Ricaricamento dei dati alla chiusura del modal - $(this).remove(); $("#modals > div").on("hidden.bs.modal", function () { globals.dashboard.calendar.refetchEvents(); @@ -564,6 +562,9 @@ globals.dashboard = { carica_interventi_da_pianificare(mese); }); }, + eventReceive: function(info){ + info.revert(); + }, selectable: globals.dashboard.write_permission, select: function (info) { // info