diff options
| author | 2022-03-15 22:58:30 +0100 | |
|---|---|---|
| committer | 2022-03-15 22:58:30 +0100 | |
| commit | be5848fd4fa280e5a4606fef25669974414547a5 (patch) | |
| tree | c11af74c2a64bdf4f1e59a4841d81d77f5977d4d /p/scripts/draggable.js | |
| parent | bdf7e4d29d954c3d2c137948577b6872c3de4656 (diff) | |
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 <alexandre@alapetite.fr>
* Update p/scripts/draggable.js
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Update p/scripts/draggable.js
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Documentation: services from #4270
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/scripts/draggable.js')
| -rw-r--r-- | p/scripts/draggable.js | 16 |
1 files changed, 14 insertions, 2 deletions
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; } |
