Make sure et2 widgets are there before the container into vfsSelectUI app object

This commit is contained in:
Hadi Nategh 2021-07-06 15:50:49 +02:00
parent 70faf346e4
commit 89695620bc
4 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ export var egw_keycode_translation_function = function(_nativeKeyCode) {
* Checks whether the given keycode is in the list of valid key codes. If not, * Checks whether the given keycode is in the list of valid key codes. If not,
* returns -1. * returns -1.
*/ */
function egw_keycode_makeValid(_keyCode) { export function egw_keycode_makeValid(_keyCode) {
var idx = EGW_VALID_KEYS.indexOf(_keyCode); var idx = EGW_VALID_KEYS.indexOf(_keyCode);
if (idx >= 0) { if (idx >= 0) {
return _keyCode; return _keyCode;

View File

@ -1453,12 +1453,12 @@ export class et2_vfsSelect extends et2_inputWidget
resizable: false resizable: false
}, et2_dialog._create_parent('api')); }, et2_dialog._create_parent('api'));
this.dialog.template.uniqueId = 'api.vfsSelectUI'; this.dialog.template.uniqueId = 'api.vfsSelectUI';
app.vfsSelectUI.et2 = this.dialog.template.widgetContainer;
app.vfsSelectUI.vfsSelectWidget = this;
// Keep the dialog always at the top // Keep the dialog always at the top
this.dialog.div.parent().css({"z-index": 100000}); this.dialog.div.parent().css({"z-index": 100000});
this.dialog.div.on('load', function(e) { this.dialog.div.on('load', function(e) {
app.vfsSelectUI.et2 = self.dialog.template.widgetContainer;
app.vfsSelectUI.vfsSelectWidget = self;
app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI'); app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI');
}); });

View File

@ -26,7 +26,6 @@ import {egwIsMobile} from "../egw_action/egw_action_common.js";
//import './et2-button'; //import './et2-button';
/* Include all widget classes here, we only care about them registering, not importing anything*/ /* Include all widget classes here, we only care about them registering, not importing anything*/
import './et2_widget_vfs'; // Vfs must be first (before et2_widget_file) due to import cycle import './et2_widget_vfs'; // Vfs must be first (before et2_widget_file) due to import cycle
import './vfsSelectUI';
import './et2_widget_template'; import './et2_widget_template';
import './et2_widget_grid'; import './et2_widget_grid';
import './et2_widget_box'; import './et2_widget_box';
@ -75,6 +74,7 @@ import './et2_widget_script';
import './et2_widget_countdown'; import './et2_widget_countdown';
import './et2_extension_nextmatch'; import './et2_extension_nextmatch';
import './et2_extension_customfields'; import './et2_extension_customfields';
import './vfsSelectUI';
/** /**

View File

@ -17,7 +17,7 @@ import {et2_dialog} from "../../api/js/etemplate/et2_widget_dialog";
import {et2_button} from "../../api/js/etemplate/et2_widget_button"; import {et2_button} from "../../api/js/etemplate/et2_widget_button";
import {egw_getObjectManager} from '../../api/js/egw_action/egw_action.js'; import {egw_getObjectManager} from '../../api/js/egw_action/egw_action.js';
import {egwIsMobile} from "../../api/js/egw_action/egw_action_common.js"; import {egwIsMobile} from "../../api/js/egw_action/egw_action_common.js";
import {egw_keycode_translation_function} from "../../api/js/egw_action/egw_keymanager.js"; import {egw_keycode_translation_function, egw_keycode_makeValid} from "../../api/js/egw_action/egw_keymanager.js";
/* required dependency, commented out because no module, but egw:uses is no longer parsed /* required dependency, commented out because no module, but egw:uses is no longer parsed
*/ */