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