]> git.wh0rd.org Git - tt-rss.git/commitdiff
map inline search to |
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 19 May 2008 06:37:55 +0000 (07:37 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 19 May 2008 06:37:55 +0000 (07:37 +0100)
functions.php
tt-rss.js
viewfeed.js

index fcbfe40fb1c26dcb99569d9ffc3a03a51ef55577..698efeb208d1c094cc144490b0b9df1ad81b3d40 100644 (file)
                        print "<td class=\"headlineTitle$rtl_cpart\">";
 
                        print "<span id=\"subtoolbar_search\" 
-                               style=\"display : none\">Search: <input 
+                               style=\"display : none\"><input 
                                id=\"subtoolbar_search_box\"
                                onblur=\"javascript:enableHotkeys();\" 
                                onfocus=\"javascript:disableHotkeys();\"
index f1fe969986cc1074a2f3fb8b5dee6e5864975dce..247dca2a260f30cb0fbb1475e35d6b28e3a26272 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -1106,6 +1106,18 @@ function hotkey_handler(e) {
                                }
                        }
 
+                       if (keycode == 220 && shift_key) { // shift + |
+                               if (document.getElementById("subtoolbar_search")) {
+                                       if (Element.visible("subtoolbar_search")) {
+                                               Element.hide("subtoolbar_search");
+                                               Element.show("subtoolbar_ftitle");
+                                               setTimeout("Element.focus('subtoolbar_search_box')", 100);
+                                       } else {
+                                                       Element.show("subtoolbar_search");
+                                               Element.hide("subtoolbar_ftitle");
+                                       }
+                               }
+                       }
                }
 
                /* Prefix f */
index ce8a14fa21939db8d5a938c57abf7a55319e9906..da03a6a2de074d2518e2be785ed0bf8f84bb310f 100644 (file)
@@ -1836,7 +1836,6 @@ function fixHeadlinesOrder(ids) {
 }
 
 function subtoolbarSearch() {
-
        try {
 
                var q = document.getElementById("subtoolbar_search_box");
@@ -1871,7 +1870,7 @@ function subtoolbarSearch() {
 
        } catch (e) {
                exception_error("subtoolbarSearch", e);
-       }
+       } 
 }
 
 function getArticleUnderPointer() {