diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index 5bf84b6651..0631d9e3b7 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -239,6 +239,11 @@ class Etemplate extends Etemplate\Widget\Template { Framework::includeJS($path); } + // if app has no app.ts/js, we need to load etemplate2.js, otherwise popups wont work! + else + { + Framework::includeJS('/api/js/etemplate/etemplate2.js'); + } // Category styles Categories::css($app); diff --git a/api/src/Framework/Bundle.php b/api/src/Framework/Bundle.php index 2131bfe80d..7b4d6bda89 100644 --- a/api/src/Framework/Bundle.php +++ b/api/src/Framework/Bundle.php @@ -119,7 +119,7 @@ class Bundle $mod = $min_mod; } // use cache-buster only for entry-points / app.js, as the have no hash - if (preg_match('#/js/app(\.min)?\.js$#', $file)) + if (preg_match('#/js/(app(\.min)?|etemplate/etemplate2)\.js$#', $file)) { $to_include[$file] = $path.'?'.$mod.($query ? '&'.$query : ''); } diff --git a/rollup.config.js b/rollup.config.js index 2ba5ced810..c55223a1dd 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -31,6 +31,7 @@ const config = { "pixelegg/js/fw_pixelegg.min": "pixelegg/js/fw_pixelegg.js", "pixelegg/js/fw_mobile.min": "pixelegg/js/fw_mobile.js", "api/js/jsapi/egw.min": "api/js/jsapi/egw_modules.js", + "api/js/etemplate/etemplate2": "api/js/etemplate/etemplate2.ts", // app.ts/js are added automatic by addAppsConfig() below },