diff --git a/api/js/egw_action/egw_action_common.js b/api/js/egw_action/egw_action_common.js index e250edaaa7..25c512bf8a 100644 --- a/api/js/egw_action/egw_action_common.js +++ b/api/js/egw_action/egw_action_common.js @@ -396,17 +396,14 @@ egwFnct.prototype.setValue = function(_value) // check if we need a not yet included app.js object --> include it now and re-set when it arrives else if (i === 1 && typeof app.classes[parts[1]] === "undefined") { - var self = this; - return new Promise(function(resolve) - { - egw.includeJS("/"+parts[1]+"/js/app.js", function () - { - if(typeof app.classes[parts[i]] !== "undefined") + return import(egw.webserverUrl+"/"+parts[1]+"/js/app.min.js?"+((new Date).valueOf()/86400|0).toString()) + .then(() => { + if(typeof app.classes[parts[i]] === "undefined") { - resolve(this.setValue(_value)); + throw new Error("app.classes."+parts[i]+" not found!"); } - }.bind(this), self, egw.webserverUrl); - }.bind(this)); + this.setValue(_value); + }); } // check if we need a not yet instantiated app.js object --> instantiate it now else if (i === 1 && typeof app.classes[parts[1]] === "function") diff --git a/api/js/jsapi/egw_json.js b/api/js/jsapi/egw_json.js index dad1ebc5ef..020dab9626 100644 --- a/api/js/jsapi/egw_json.js +++ b/api/js/jsapi/egw_json.js @@ -575,9 +575,9 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) // check if we need a not yet included app.js object --> include it now and return a Promise else if (i == 1 && parts[0] == 'app' && typeof app.classes[parts[1]] === 'undefined') { - return import(this.webserverUrl+'/'+parts[1]+'/js/app.js?'+((new Date).valueOf()/86400|0).toString()) + return import(this.webserverUrl+'/'+parts[1]+'/js/app.min.js?'+((new Date).valueOf()/86400|0).toString()) .then(() => this.applyFunc(_func, args, _context), - (err) => {console.error("Failure loading /"+parts[1]+'/js/app.js' + " (" + err + ")\nAborting.")}); + (err) => {console.error("Failure loading /"+parts[1]+'/js/app.min.js' + " (" + err + ")\nAborting.")}); } // check if we need a not yet instantiated app.js object --> instantiate it now else if (i == 1 && parts[0] == 'app' && typeof app.classes[parts[1]] === 'function') diff --git a/rollup.config.js b/rollup.config.js index c55223a1dd..d36e92d712 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -154,7 +154,7 @@ export default function addAppsConfig() { try { statSync(file.name + '/js/app.ts'); - config.input[file.name + '/js/app'] = file.name + '/js/app.ts'; + config.input[file.name + '/js/app.min'] = file.name + '/js/app.ts'; } catch (e) { try {