fix popups of apps without app.ts/js wont work as eT2 is not available

it get's included by the app.ts/js otherwise
This commit is contained in:
Ralf Becker 2021-07-13 20:54:08 +02:00
parent 2439e6de98
commit 2f155e0d79
3 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -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 : '');
}

View File

@ -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
},