mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
fix after rollup build popups need extra reload
caused by no longer necessary import of etemplate2 in egw.js, as Promise works and etemplate2 is global
This commit is contained in:
parent
cf101c8e13
commit
e8da7caa64
@ -372,19 +372,17 @@ window.app = {classes: {}};
|
||||
// load etemplate2 template(s)
|
||||
jQuery('form.et2_container[data-etemplate]').each( function(index, node)
|
||||
{
|
||||
import('../etemplate/etemplate2').then((module) => {
|
||||
const data = JSON.parse(node.getAttribute('data-etemplate')) || {};
|
||||
if (popup || window.opener && !egwIsMobile()) {
|
||||
// Resize popup when et2 load is done
|
||||
jQuery(node).on('load', () => window.setTimeout(resize_popup, 50));
|
||||
}
|
||||
const et2 = new module.etemplate2(node, "EGroupware\\Api\\Etemplate::ajax_process_content");
|
||||
et2.load(data.name, data.url, data.data);
|
||||
if (typeof data.response !== 'undefined') {
|
||||
const json_request = egw(window).json("");
|
||||
json_request.handleResponse({response: data.response});
|
||||
}
|
||||
}).catch((e) => alert(e.message+"\n\n"+e.stack));
|
||||
const data = JSON.parse(node.getAttribute('data-etemplate')) || {};
|
||||
if (popup || window.opener && !egwIsMobile()) {
|
||||
// Resize popup when et2 load is done
|
||||
jQuery(node).on('load', () => window.setTimeout(resize_popup, 50));
|
||||
}
|
||||
const et2 = new etemplate2(node, "EGroupware\\Api\\Etemplate::ajax_process_content");
|
||||
et2.load(data.name, data.url, data.data);
|
||||
if (typeof data.response !== 'undefined') {
|
||||
const json_request = egw(window).json("");
|
||||
json_request.handleResponse({response: data.response});
|
||||
}
|
||||
});
|
||||
|
||||
// Offline/Online checking part
|
||||
|
@ -21,7 +21,7 @@ import { readdir,stat } from 'fs/promises';
|
||||
rimraf.sync('./chunks/');
|
||||
|
||||
// Turn on minification
|
||||
const do_minify = false;
|
||||
const do_minify = true;
|
||||
|
||||
const config = {
|
||||
treeshake: false,
|
||||
@ -30,7 +30,6 @@ const config = {
|
||||
// Note the .ts extension on the input - we build directly from the TypeScript when available
|
||||
"pixelegg/js/fw_pixelegg.min": "pixelegg/js/fw_pixelegg.js",
|
||||
"pixelegg/js/fw_mobile.min": "pixelegg/js/fw_mobile.js",
|
||||
"api/js/etemplate/etemplate2.min":"api/js/etemplate/etemplate2.ts",
|
||||
"api/js/egw_action/egw_dragdrop_dhtmlx_tree.min":"api/js/egw_action/egw_dragdrop_dhtmlx_tree.js",
|
||||
"api/js/jsapi/egw.min": "api/js/jsapi/egw_modules.js",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user