From 9ba6dc94253ede113e80933faeef0d1954f91391 Mon Sep 17 00:00:00 2001 From: Tome Perica Date: Wed, 6 Dec 2023 15:10:30 +0100 Subject: [PATCH] prevent scrolling fix --- src/resources/lang/de.json | 3 ++- src/resources/views/campaign/show.blade.php | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/resources/lang/de.json b/src/resources/lang/de.json index c23d931..9801b40 100644 --- a/src/resources/lang/de.json +++ b/src/resources/lang/de.json @@ -19,5 +19,6 @@ "Back": "Zurück", "VAT": "USt-ID", "Notes": "Notes", - "Note": "Note" + "Note": "Note", + "Activities": "Activities" } diff --git a/src/resources/views/campaign/show.blade.php b/src/resources/views/campaign/show.blade.php index d97686f..9c2dae5 100644 --- a/src/resources/views/campaign/show.blade.php +++ b/src/resources/views/campaign/show.blade.php @@ -163,12 +163,10 @@ function handleMouseMove(e) { dragula(stages) .on('drag', function (el) { el.className = el.className.replace('bg-light', 'bg-gray-400'); - document.addEventListener('mousemove', handleMouseMove, false); }) .on('drop', function (el, target, source, sibling) { - console.log('drop') el.className = el.className.replace('bg-gray-400', 'bg-light'); axios.post('{{ route('stage.change') }}', { @@ -181,8 +179,13 @@ function handleMouseMove(e) { document.removeEventListener('mousemove', handleMouseMove, false); }) .on('over', function (el, container) { - console.log('over') el.className = el.className.replace('bg-gray-400', 'bg-light'); + + }) + .on('cancel', function (el, container, source) { + el.className = el.className.replace('bg-gray-400', 'bg-light'); + + document.removeEventListener('mousemove', handleMouseMove, false); }) });