]> git.wh0rd.org - tt-rss.git/blobdiff - prefs.php
fetch_file_contents: support retarded schema-less urls
[tt-rss.git] / prefs.php
index b617d94bc917e754b771d7f374c012ed921a9fe0..cc62677981dfc30f2632bb19a69efda228c43928 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 <head>
        <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title>
 
-       <?php stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
-       <?php stylesheet_tag("tt-rss.css"); ?>
-       <?php stylesheet_tag("prefs.css"); ?>
+       <script type="text/javascript">
+               var __ttrss_version = "<?php echo VERSION ?>"
+       </script>
+
+       <?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
+       <?php echo stylesheet_tag("css/layout.css"); ?>
 
        <?php if ($_SESSION["uid"]) {
                $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
-               if ($theme) {
-                       stylesheet_tag("themes/$theme");
+               if ($theme && file_exists("themes/$theme")) {
+                       echo stylesheet_tag("themes/$theme");
+               } else {
+                       echo stylesheet_tag("themes/default.css");
                }
        }
        ?>
 
        <?php
        foreach (array("lib/prototype.js",
-                               "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls",
+                               "lib/scriptaculous/scriptaculous.js?load=effects,controls",
                                "lib/dojo/dojo.js",
-                               "lib/dijit/dijit.js",
-                               "lib/CheckBoxTree.js",
                                "lib/dojo/tt-rss-layer.js",
                                "errors.php?mode=js") as $jsfile) {
 
-               javascript_tag($jsfile);
+               echo javascript_tag($jsfile);
 
        } ?>
 
        <script type="text/javascript">
+               require({cache:{}});
        <?php
-               require 'lib/jshrink/Minifier.php';
+               require_once 'lib/jshrink/Minifier.php';
 
                foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
                        if (method_exists($p, "get_prefs_js")) {
@@ -72,7 +76,7 @@
                        }
                }
 
-               print get_minified_js(array("functions", "deprecated", "prefs", "PrefFeedTree", "PrefFilterTree", "PrefLabelTree"));
+               print get_minified_js(array("../lib/CheckBoxTree","functions", "deprecated", "prefs", "PrefFeedTree", "PrefFilterTree", "PrefLabelTree"));
 
                init_js_translations();
        ?>
@@ -90,7 +94,7 @@
 
 <body id="ttrssPrefs" class="claro">
 
-<div id="notify" class="notify" style="display : none"></div>
+<div id="notify" class="notify"></div>
 <div id="cmdline" style="display : none"></div>
 
 <div id="overlay">