]> git.wh0rd.org Git - tt-rss.git/commitdiff
enable search toolbar
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 21 May 2006 12:09:55 +0000 (13:09 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 21 May 2006 12:09:55 +0000 (13:09 +0100)
backend.php
feedlist.js
tt-rss.js
tt-rss.php

index 25305e5ab8e0aaf3053d874fa7aca819ca23103e..8e35292871a0fc4559d1d49d46b2b08649caf459 100644 (file)
                        window.onload = init;
                        </script>";
 
-//             print_r($_GET);
-
                $search = db_escape_string($_GET["query"]);
                $search_mode = db_escape_string($_GET["search_mode"]);
                $match_on = db_escape_string($_GET["match_on"]);
index b5ca9aca2c858b502c1b4ce74a11ab95a8fa1512..f61feac607aa02cefdca15457112f788b7f93b91 100644 (file)
@@ -79,6 +79,10 @@ function viewfeed(feed, skip, subop, doc, is_cat, subop_param) {
 
                var toolbar_query = parent.Form.serialize("main_toolbar_form");
 
+               if (parent.document.forms["main_toolbar_form"].query) {
+                       parent.document.forms["main_toolbar_form"].query.value = "";
+               }
+
                var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
                        toolbar_query + "&subop=" + param_escape(subop);
 
index 1d4e022a1a0710f3f699bacb6c0411e770ca0722..765cb1e72395c24331fdc2475323c79422397225 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -248,6 +248,7 @@ function viewCurrentFeed(skip, subop) {
                disableContainerChildren("headlinesToolbar", false, document);
                viewfeed(-1, skip, subop); // FIXME
        }
+       return false; // block unneeded form submits
 }
 
 function viewfeed(feed, skip, subop) {
index c915bbc2d14b9dd47d7db260dc5812790e23d4b2..c405215639114a3c5bf2b1d95118c02de6128373 100644 (file)
@@ -150,26 +150,17 @@ window.onload = init;
 
                <tr><td class="headlinesToolbar" id="headlinesToolbar">
 
-<!--           <? if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
+               <form id="main_toolbar_form">
 
-               <input id="searchbox"
+               <? if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
+               <input name="query"
+                       onKeyPress="return filterCR(event)"
                        onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
-               <select id="searchmodebox">
-                       <option value="all_feeds">All feeds</option>
-                       <option value="this_feed" selected>This feed</option>
-                       <? if (get_pref($link, 'ENABLE_FEED_CATS')) { ?>
-                       <option value="this_cat">This category</option>
-                       <? } ?>
-               </select>
-               
-               <input type="submit" 
-                       class="button" onclick="javascript:search()" value="Search">
+               <input class="button" type="submit"
+                       onclick="return viewCurrentFeed(0)" value="Search">
+               &nbsp; 
+               <? } ?>
 
-                       &nbsp; 
-               
-               <? } ?> -->
-               
-               <form id="main_toolbar_form">
                View:           
                <select name="view_mode" onchange="viewCurrentFeed(0, '')">
                        <option selected value="adaptive">Adaptive</option>
@@ -177,7 +168,8 @@ window.onload = init;
                        <option value="marked">Starred</option>
                        <option value="unread">Unread</option>
                </select>
-               &nbsp;Limit:
+               
+               &nbsp;Limit:            
                <?
                $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");