From ad98fb299b074c81e6dc5f70fa5133926ba476ac Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 26 May 2022 17:28:58 +0200 Subject: [PATCH] disabling DND in toolbar for now --- api/js/etemplate/et2_widget_toolbar.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/api/js/etemplate/et2_widget_toolbar.ts b/api/js/etemplate/et2_widget_toolbar.ts index 34a85aab25..16b212191b 100644 --- a/api/js/etemplate/et2_widget_toolbar.ts +++ b/api/js/etemplate/et2_widget_toolbar.ts @@ -452,6 +452,7 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput toolbox = this.actionbox, menulist = jQuery(this.actionbox.children()[1]); + /* disabling DND in toolbar for now toolbar.draggable({ cancel:'', zIndex: 1000, @@ -495,6 +496,15 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput tolerance:"touch" }); + this.actionlist.droppable({ + tolerance:"pointer", + drop:function (event,ui) { + that.set_prefered(ui.draggable[0].id.replace(that.id + '-', ''), false); + ui.draggable.appendTo(that.actionlist); + that._build_menu(actions); + } + });*/ + toolbox.on('toggle', (e)=>{ const details = e.target; if (details.open) @@ -515,15 +525,6 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput }); } }); - - this.actionlist.droppable({ - tolerance:"pointer", - drop:function (event,ui) { - that.set_prefered(ui.draggable[0].id.replace(that.id + '-', ''), false); - ui.draggable.appendTo(that.actionlist); - that._build_menu(actions); - } - }); } /** @@ -847,5 +848,4 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput document.body.appendChild(dialog); } } -et2_register_widget(et2_toolbar, ["toolbar"]); - +et2_register_widget(et2_toolbar, ["toolbar"]); \ No newline at end of file