From 936983d4fe0caff8b4199df1c4807335d5150769 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 19 Oct 2020 12:54:16 +0200 Subject: [PATCH] * Filemanager: fix drag and drop a file no longer working from outside of browser into the list --- api/js/etemplate/et2_widget_file.js | 3 +++ api/js/etemplate/et2_widget_file.ts | 2 ++ filemanager/templates/default/index.xet | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_file.js b/api/js/etemplate/et2_widget_file.js index 3d24d78af4..fe403ff0d5 100644 --- a/api/js/etemplate/et2_widget_file.js +++ b/api/js/etemplate/et2_widget_file.js @@ -146,6 +146,9 @@ var et2_file = /** @class */ (function (_super) { this.input.attr("multiple", "multiple"); } this.setDOMNode(this.node[0]); + // set drop target to widget dom node if no target option is specified + if (!this.options.drop_target) + this.resumable.assignDrop([this.getDOMNode()]); }; /** * Get any specific async upload options diff --git a/api/js/etemplate/et2_widget_file.ts b/api/js/etemplate/et2_widget_file.ts index 5abc7bbe47..1cfbbb433a 100644 --- a/api/js/etemplate/et2_widget_file.ts +++ b/api/js/etemplate/et2_widget_file.ts @@ -237,6 +237,8 @@ export class et2_file extends et2_inputWidget } this.setDOMNode(this.node[0]); + // set drop target to widget dom node if no target option is specified + if (!this.options.drop_target) this.resumable.assignDrop([this.getDOMNode()]); } /** diff --git a/filemanager/templates/default/index.xet b/filemanager/templates/default/index.xet index 8558d1c102..e6245dba73 100644 --- a/filemanager/templates/default/index.xet +++ b/filemanager/templates/default/index.xet @@ -45,7 +45,7 @@