]> git.wh0rd.org - tt-rss.git/blobdiff - prefs.php
dojoConfig: use cacheBust
[tt-rss.git] / prefs.php
index 191f452c4e11cad86e0639cbe238ef45447244e6..4298c38a2be7efd4fd4e00527838c0464834ab46 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -42,7 +42,7 @@
        <?php if ($_SESSION["uid"]) {
                $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
                if ($theme && theme_valid("$theme")) {
-                       echo stylesheet_tag("themes/$theme");
+                       echo stylesheet_tag(get_theme_path($theme));
                } else {
                        echo stylesheet_tag("themes/default.css");
                }
        <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,
+                       cacheBust: new Date(),
+                       packages: [
+                               { name: "lib", location: "../" },
+                               { name: "fox", location: "../../js" },
+                       ]
+               };
+       </script>
+
        <?php
        foreach (array("lib/prototype.js",
                                "lib/scriptaculous/scriptaculous.js?load=effects,controls",
 
                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();
        ?>