]> git.wh0rd.org - tt-rss.git/blobdiff - index.php
dojoConfig: use cacheBust
[tt-rss.git] / index.php
index 309ca2e29521245ab2274133fed652d67502f22c..66314ad17d2271b653e7822989529a6c8234d9b8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -66,7 +66,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: "fox", location: "../../js" },
+                       ]
+               };
+       </script>
+
        <?php
        foreach (array("lib/prototype.js",
                                "lib/scriptaculous/scriptaculous.js?load=effects,controls",
                require_once 'lib/jshrink/Minifier.php';
 
                print get_minified_js(array("tt-rss",
-                       "functions", "feedlist", "viewfeed", "FeedTree", "PluginHost"));
+                       "functions", "feedlist", "viewfeed", "PluginHost"));
 
                foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
                        if (method_exists($p, "get_js")) {
+                               echo "try {";
                                echo JShrink\Minifier::minify($p->get_js());
+                               echo "} catch (e) {
+                                       console.warn('failed to initialize plugin JS: $n');
+                                       console.warn(e);
+                               }";
                        }
                }
 
        </script>
 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+       <meta name="referrer" content="no-referrer"/>
 
        <script type="text/javascript">
                Event.observe(window, 'load', function() {
 
 <div id="notify" class="notify"></div>
 <div id="cmdline" style="display : none"></div>
-<div id="headlines-tmp" style="display : none"></div>
 
 <div id="main" dojoType="dijit.layout.BorderContainer">
 
 <div id="toolbar" dojoType="dijit.layout.ContentPane" region="top">
        <div id="main-toolbar" dojoType="dijit.Toolbar">
 
+               <?php
+               foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) {
+                       echo $p->hook_main_toolbar_button();
+               }
+               ?>
+
                <form id="headlines-toolbar" action="" onsubmit='return false'>
 
                </form>
 
                <form id="main_toolbar_form" action="" onsubmit='return false'>
 
-               <button dojoType="dijit.form.Button" id="collapse_feeds_btn"
-                       onclick="collapse_feedlist()"
-                       title="<?php echo __('Collapse feedlist') ?>" style="display : none">
-                       &lt;&lt;</button>
-
                <select name="view_mode" title="<?php echo __('Show articles') ?>"
                        onchange="viewModeChanged()"
                        dojoType="dijit.form.Select">
                        <option value="marked"><?php echo __('Starred') ?></option>
                        <option value="published"><?php echo __('Published') ?></option>
                        <option value="unread"><?php echo __('Unread') ?></option>
-                       <option value="unread_first"><?php echo __('Unread First') ?></option>
                        <option value="has_note"><?php echo __('With Note') ?></option>
                        <!-- <option value="noscores"><?php echo __('Ignore Scoring') ?></option> -->
                </select>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcShowOnlyUnread')"><?php echo __('(Un)hide read feeds') ?></div>
                                        <div dojoType="dijit.MenuItem" disabled="1"><?php echo __('Other actions:') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcToggleWidescreen')"><?php echo __('Toggle widescreen mode') ?></div>
-                                       <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcTagSelect')"><?php echo __('Select by tags...') ?></div>
                                        <!-- <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddLabel')"><?php echo __('Create label...') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFilter')"><?php echo __('Create filter...') ?></div> -->
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcHKhelp')"><?php echo __('Keyboard shortcuts help') ?></div>
                                        <?php } ?>
                                </div>
                        </div>
+
+                       <button id="updatesIcon" dojoType="dijit.form.Button" style="display : none">
+                               <img src="images/new_version.png" title="<?php echo __('Updates are available from Git.') ?>"/>
+                       </button>
                </div>
        </div> <!-- toolbar -->
 </div> <!-- toolbar pane -->