]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove top hello - feedback - preferences line
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 6 Feb 2013 16:14:06 +0000 (20:14 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 6 Feb 2013 16:14:06 +0000 (20:14 +0400)
config.php-dist
index.php
js/functions.js
js/tt-rss.js
js/viewfeed.js
tt-rss.css

index aaee2f2ebdd4bfdb15b835e3090f436d7d6c103e..b1f238ca010d6acd7b707daf768f76e3ee94115c 100644 (file)
        // Users may enable other user plugins from Preferences/Plugins but may not
        // disable plugins specified in this list.
 
-       define('FEEDBACK_URL', '');
-       // Displays an URL for users to provide feedback or comments regarding
-       // this instance of tt-rss. Can lead to a forum, contact email, etc.
-
        define('CONFIG_VERSION', 26);
        // Expected config version. Please update this option in config.php
        // if necessary (after migrating all new options from this file).
index 6ddf5de6e59975d430e170b74459b681267d58c8..5f902d5192efaa1799b5296645448810c7c46f20 100644 (file)
--- a/index.php
+++ b/index.php
                title="<?php echo __("Communication problem with server.") ?>"
                src="<?php echo theme_image($link, 'images/alert.png') ?>"/>
 
-       <?php if (!$_SESSION["hide_hello"]) { ?>
-                       <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
-       <?php } ?>
-       <a href="prefs.php"><?php echo __('Preferences') ?></a>
-
-       <?php if (defined('FEEDBACK_URL') && FEEDBACK_URL) { ?>
-               | <a target="_blank" class="feedback" href="<?php echo FEEDBACK_URL ?>">
-                               <?php echo __('Comments?') ?></a>
-       <?php } ?>
-
-       <?php if (!$_SESSION["hide_logout"]) { ?>
-                       | <a href="backend.php?op=logout"><?php echo __('Logout') ?></a>
-       <?php } ?>
-
        <img id="newVersionIcon" style="display:none" onclick="newVersionDlg()"
                width="13" height="13"
                src="<?php echo theme_image($link, 'images/new_version.png') ?>"
                </form>
 
                <div class="actionChooser">
+
+                       <button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
+                               title="<?php echo __("Communication problem with server.") ?>">
+                       <img
+                               src="<?php echo theme_image($link, 'images/alert.png') ?>" />
+                       </button>
+
+                       <button id="newVersionIcon" dojoType="dijit.form.Button" style="display : none">
+                       <img onclick="newVersionDlg()"
+                               src="<?php echo theme_image($link, 'images/new_version.png') ?>"
+                               title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" />
+                       </button>
+
+
                        <div dojoType="dijit.form.DropDownButton">
                                <span><?php echo __('Actions...') ?></span>
                                <div dojoType="dijit.Menu" style="display: none">
+                                       <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcPrefs')"><?php echo __('Preferences...') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcSearch')"><?php echo __('Search...') ?></div>
                                        <div dojoType="dijit.MenuItem" disabled="1"><?php echo __('Feed actions:') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFeed')"><?php echo __('Subscribe to feed...') ?></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 if (!$_SESSION["hide_logout"]) { ?>
+                                               <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcLogout')"><?php echo __('Logout') ?></div>
+                                       <?php } ?>
                                </div>
                        </div>
                </div>
index ec533faae75fc1477fd0e651249c9ec0534a8dda..cef47f8e4f0463ca04fdd1b6e54d41591740c6cf 100644 (file)
@@ -292,6 +292,10 @@ function gotoPreferences() {
        document.location.href = "prefs.php";
 }
 
+function gotoLogout() {
+       document.location.href = "backend.php?op=logout";
+}
+
 function gotoMain() {
        document.location.href = "index.php";
 }
index 9d18519b2e12c4f36d6648a8aada1feb29a96b69..2e09c86cdfd84c49948471adaaa06d99c9714c72 100644 (file)
@@ -335,42 +335,35 @@ function init_second_stage() {
 
 function quickMenuGo(opid) {
        try {
-               if (opid == "qmcPrefs") {
+               switch (opid) {
+               case "qmcPrefs":
                        gotoPreferences();
-               }
-
-               if (opid == "qmcTagCloud") {
+                       break;
+               case "qmcLogout":
+                       gotoLogout();
+                       break;
+               case "qmcTagCloud":
                        displayDlg("printTagCloud");
-               }
-
-               if (opid == "qmcTagSelect") {
+                       break;
+               case "qmcTagSelect":
                        displayDlg("printTagSelect");
-               }
-
-               if (opid == "qmcSearch") {
+                       break;
+               case "qmcSearch":
                        search();
-                       return;
-               }
-
-               if (opid == "qmcAddFeed") {
+                       break;
+               case "qmcAddFeed":
                        quickAddFeed();
-                       return;
-               }
-
-               if (opid == "qmcDigest") {
+                       break;
+               case "qmcDigest":
                        window.location.href = "backend.php?op=digest";
-                       return;
-               }
-
-               if (opid == "qmcEditFeed") {
+                       break;
+               case "qmcEditFeed":
                        if (activeFeedIsCat())
                                alert(__("You can't edit this kind of feed."));
                        else
                                editFeed(getActiveFeedId());
-                       return;
-               }
-
-               if (opid == "qmcRemoveFeed") {
+                       break;
+               case "qmcRemoveFeed":
                        var actid = getActiveFeedId();
 
                        if (activeFeedIsCat()) {
@@ -390,46 +383,34 @@ function quickMenuGo(opid) {
                        if (confirm(pr)) {
                                unsubscribeFeed(actid);
                        }
-
-                       return;
-               }
-
-               if (opid == "qmcCatchupAll") {
+                       break;
+               case "qmcCatchupAll":
                        catchupAllFeeds();
-                       return;
-               }
-
-               if (opid == "qmcShowOnlyUnread") {
+                       break;
+               case "qmcShowOnlyUnread":
                        toggleDispRead();
-                       return;
-               }
-
-               if (opid == "qmcAddFilter") {
+                       break;
+               case "qmcAddFilter":
                        quickAddFilter();
-                       return;
-               }
-
-               if (opid == "qmcAddLabel") {
+                       break;
+               case "qmcAddLabel":
                        addLabel();
-                       return;
-               }
-
-               if (opid == "qmcRescoreFeed") {
+                       break;
+               case "qmcRescoreFeed":
                        rescoreCurrentFeed();
-                       return;
-               }
-
-               if (opid == "qmcToggleWidescreen") {
+                       break;
+               case "qmcToggleWidescreen":
                        if (!isCdmMode()) {
                                _widescreen_mode = !_widescreen_mode;
 
                                switchPanelMode(_widescreen_mode);
                        }
-                       return;
-               }
-
-               if (opid == "qmcHKhelp") {
+                       break;
+               case "qmcHKhelp":
                        helpDialog("main");
+                       break;
+               default:
+                       console.log("quickMenuGo: unknown action: " + opid);
                }
 
        } catch (e) {
@@ -469,13 +450,10 @@ function parse_runtime_info(data) {
 //             console.log("RI: " + k + " => " + v);
 
                if (k == "new_version_available") {
-                       var icon = $("newVersionIcon");
-                       if (icon) {
-                               if (v == "1") {
-                                       icon.style.display = "inline";
-                               } else {
-                                       icon.style.display = "none";
-                               }
+                       if (v == "1") {
+                               Element.show(dijit.byId("newVersionIcon").domNode);
+                       } else {
+                               Element.hide(dijit.byId("newVersionIcon").domNode);
                        }
                        return;
                }
@@ -908,15 +886,15 @@ function handle_rpc_json(transport, scheduled_call) {
 
                        hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
 
-                       Element.hide("net-alert");
+                       Element.hide(dijit.byId("net-alert").domNode);
 
                } else {
                        //notify_error("Error communicating with server.");
-                       Element.show("net-alert");
+                       Element.show(dijit.byId("net-alert").domNode);
                }
 
        } catch (e) {
-               Element.show("net-alert");
+               Element.show(dijit.byId("net-alert").domNode);
                //notify_error("Error communicating with server.");
                console.log(e);
                //exception_error("handle_rpc_json", e, transport);
index 34235eba2b78d36e504a548713096b396b2527b8..1cdfdba3f62a11d963ddeafb68328f43e4fa0ca9 100644 (file)
@@ -211,7 +211,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
                                        "</div>");
                } else {
                        //notify_error("Error communicating with server.");
-                       Element.show("net-alert");
+                       Element.show(dijit.byId("net-alert").domNode);
                }
 
                _infscroll_request_sent = 0;
@@ -322,7 +322,7 @@ function article_callback2(transport, id) {
                        render_article("<div class='whiteBox'>" +
                                        __('Could not display article (invalid object received - see error console for details)') + "</div>");
                } else {
-                       Element.show("net-alert");
+                       Element.show(dijit.byId("net-alert").domNode);
                }
 
                request_counters();
index b636140d2596516c395aee9610a579ad3bf8ddbb..5c5042482d06477a0818fcd609962d8576ee6b53 100644 (file)
@@ -1079,10 +1079,10 @@ div.fatalError textarea {
 
 #content-wrap {
        padding : 0px;
-       border-width : 1px 0px 1px 1px;
+       border-width : 0px 0px 1px 1px;
        border-style : solid;
        border-color : #c0c0c0;
-       margin : 25px 0px 0px 0px;
+       margin : 0px;
 }
 
 #feeds-holder {
@@ -1235,13 +1235,6 @@ a.bookmarklet {
        padding : 2px;
 }
 
-#newVersionIcon {
-       margin-left : 5px;
-       vertical-align : middle;
-       position : relative;
-       top : -1px;
-}
-
 .player {
        display : inline-block;
        color : gray;