From 22f498d6e2304835ca868baa085a2e920b044c85 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 25 Mar 2020 13:48:04 -0600 Subject: [PATCH] Try to fix navigation issues in file select popup --- api/js/etemplate/et2_widget_vfs.js | 10 +++++----- api/js/etemplate/et2_widget_vfs.ts | 4 ++-- api/js/etemplate/vfsSelectUI.js | 2 +- api/js/etemplate/vfsSelectUI.ts | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/js/etemplate/et2_widget_vfs.js b/api/js/etemplate/et2_widget_vfs.js index 0ab9ca2800..3398a73149 100644 --- a/api/js/etemplate/et2_widget_vfs.js +++ b/api/js/etemplate/et2_widget_vfs.js @@ -855,7 +855,7 @@ var et2_vfsUpload = /** @class */ (function (_super) { while (this._children.length > 0) { var node = this._children[this._children.length - 1]; this.removeChild(node); - node.destroy(); + node.destroy(); } this.progress.empty(); this.list.empty(); @@ -918,8 +918,8 @@ var et2_vfsUpload = /** @class */ (function (_super) { for (var child_index = this._children.length - 1; child_index >= 0; child_index--) { var child = this._children[child_index]; if (child.options.value.path === file_data.path) { - this.removeChild(child); - child.destroy(); + this.removeChild(child); + child.destroy(); } } } @@ -1144,6 +1144,8 @@ var et2_vfsSelect = /** @class */ (function (_super) { resizable: false }, et2_widget_dialog_1.et2_dialog._create_parent('api')); this.dialog.template.uniqueId = 'api.vfsSelectUI'; + app.vfsSelectUI.et2 = this.dialog.template.widgetContainer; + app.vfsSelectUI.vfsSelectWidget = this; // Don't rely only on app_name to fetch et2 object as app_name may not // always represent current app of the window, e.g.: mail admin account. // Try to fetch et2 from its template name. @@ -1159,10 +1161,8 @@ var et2_vfsSelect = /** @class */ (function (_super) { // widgets and since we can not have a etemplate_exec_id specifically // for dialog template our best shot is to inherit its parent etemplate_exec_id. this.dialog.template.etemplate_exec_id = et2.etemplate_exec_id; - app.vfsSelectUI.et2 = this.dialog.template.widgetContainer; // Keep the dialog always at the top this.dialog.div.parent().css({ "z-index": 100000 }); - app.vfsSelectUI.vfsSelectWidget = this; this.dialog.div.on('load', function (e) { app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI'); }); diff --git a/api/js/etemplate/et2_widget_vfs.ts b/api/js/etemplate/et2_widget_vfs.ts index 1bfd4a1089..40c830d619 100644 --- a/api/js/etemplate/et2_widget_vfs.ts +++ b/api/js/etemplate/et2_widget_vfs.ts @@ -1398,6 +1398,8 @@ export class et2_vfsSelect extends et2_inputWidget resizable: false }, et2_dialog._create_parent('api')); this.dialog.template.uniqueId = 'api.vfsSelectUI'; + app.vfsSelectUI.et2 = this.dialog.template.widgetContainer; + app.vfsSelectUI.vfsSelectWidget = this; // Don't rely only on app_name to fetch et2 object as app_name may not // always represent current app of the window, e.g.: mail admin account. @@ -1417,10 +1419,8 @@ export class et2_vfsSelect extends et2_inputWidget // for dialog template our best shot is to inherit its parent etemplate_exec_id. this.dialog.template.etemplate_exec_id = et2.etemplate_exec_id; - app.vfsSelectUI.et2 = this.dialog.template.widgetContainer; // Keep the dialog always at the top this.dialog.div.parent().css({"z-index": 100000}); - app.vfsSelectUI.vfsSelectWidget = this; this.dialog.div.on('load', function(e) { app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI'); }); diff --git a/api/js/etemplate/vfsSelectUI.js b/api/js/etemplate/vfsSelectUI.js index 1a2b6f5439..78e2ed58d7 100644 --- a/api/js/etemplate/vfsSelectUI.js +++ b/api/js/etemplate/vfsSelectUI.js @@ -42,7 +42,7 @@ var vfsSelectUI = /** @class */ (function (_super) { function vfsSelectUI() { var _this = // call parent - _super.call(this) || this; + _super.call(this, 'vfsSelectUI') || this; _this.egw.langRequireApp(_this.egw.window, 'filemanager'); return _this; } diff --git a/api/js/etemplate/vfsSelectUI.ts b/api/js/etemplate/vfsSelectUI.ts index 3c065f5766..00fa1de800 100644 --- a/api/js/etemplate/vfsSelectUI.ts +++ b/api/js/etemplate/vfsSelectUI.ts @@ -36,7 +36,7 @@ export class vfsSelectUI extends EgwApp constructor() { // call parent - super(); + super('vfsSelectUI'); this.egw.langRequireApp(this.egw.window, 'filemanager'); }