diff options
author | Andrew Dolgov <[email protected]> | 2016-08-10 12:22:30 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2016-08-10 12:22:30 +0300 |
commit | fd539f280058f2606ba6a59403287b824b6fd195 (patch) | |
tree | cf313f2005190227aa0ed59adf3fa50c78ebfc09 /prefs.php | |
parent | 0dbc20a8d48c58a180384a6a1047311c99545e48 (diff) |
prefs: use dojo asynchronously
Diffstat (limited to 'prefs.php')
-rw-r--r-- | prefs.php | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -54,6 +54,16 @@ <link rel="shortcut icon" type="image/png" href="images/favicon.png"/> <link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" /> + <script> + dojoConfig = { + async: true, + packages: [ + { name: "lib", location: "../" }, + { name: "fox", location: "../../js" }, + ] + }; + </script> + <?php foreach (array("lib/prototype.js", "lib/scriptaculous/scriptaculous.js?load=effects,controls", @@ -72,11 +82,16 @@ foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { if (method_exists($p, "get_prefs_js")) { + echo "try {"; echo JShrink\Minifier::minify($p->get_prefs_js()); + echo "} catch (e) { + console.warn('failed to initialize plugin JS: $n'); + console.warn(e); + }"; } } - print get_minified_js(array("../lib/CheckBoxTree","functions", "deprecated", "prefs", "PrefFeedTree", "PrefFilterTree", "PrefLabelTree")); + print get_minified_js(array("functions", "deprecated", "prefs")); init_js_translations(); ?> |