From be5848fd4fa280e5a4606fef25669974414547a5 Mon Sep 17 00:00:00 2001 From: maTh Date: Tue, 15 Mar 2022 22:58:30 +0100 Subject: Improved: Sharing/Integration configuration (#4269) * stick plus button to select list * HTML improved very much * drag and drop improved * add URL button * fix remove button behavior * prepare for PR#4238 * improve length of inputs * First draft of documentation of the sharing services * new config option: depricated * i18n for depricated text * Doc: Blogotext depricated to 2023 * dropdown menu with config link and depricated sign * Update entry_bottom.phtml * Update 08_sharing_services.md * Update template.rtl.css * Typo Deprecated/Depricated * typo * updated the documentation comment * Update shares.php * Update app/i18n/fr/conf.php Co-authored-by: Alexandre Alapetite * Update p/scripts/draggable.js Co-authored-by: Alexandre Alapetite * Update p/scripts/draggable.js Co-authored-by: Alexandre Alapetite * Documentation: services from #4270 Co-authored-by: Alexandre Alapetite --- p/scripts/draggable.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'p/scripts/draggable.js') diff --git a/p/scripts/draggable.js b/p/scripts/draggable.js index 8b98346f6..5e99e3227 100644 --- a/p/scripts/draggable.js +++ b/p/scripts/draggable.js @@ -27,6 +27,10 @@ const init_draggable_list = function () { draggableList.addEventListener('dragstart', event => { source = event.target.closest('[draggable="true"]'); + const dragbox = source.closest('.dragbox'); + if (dragbox) { + source = dragbox; + } event.dataTransfer.setData('text/html', source.outerHTML); event.dataTransfer.effectAllowed = 'move'; }); @@ -36,7 +40,11 @@ const init_draggable_list = function () { return; } - const draggableItem = event.target.closest('[draggable="true"]'); + let draggableItem = event.target.closest('[draggable="true"]'); + const dragbox = event.target.closest('.dragbox'); + if (dragbox) { + draggableItem = dragbox; + } if (null === draggableItem || source === draggableItem) { return; } @@ -59,7 +67,11 @@ const init_draggable_list = function () { return; } - const draggableItem = event.target.closest('[draggable="true"]'); + let draggableItem = event.target.closest('[draggable="true"]'); + const dragbox = event.target.closest('.dragbox'); + if (dragbox) { + draggableItem = dragbox; + } if (null === draggableItem || source === draggableItem) { return; } -- cgit v1.2.3