]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix global search
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 19 Nov 2005 14:27:06 +0000 (15:27 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 19 Nov 2005 14:27:06 +0000 (15:27 +0100)
feedlist.js
tt-rss.js

index ebaea0de988edcb243c19f923bfdb8aed479a1a2..93b598146a93f535a2ac0fa17494852bc3a2c473 100644 (file)
@@ -15,12 +15,24 @@ function viewfeed(feed, skip, subop, doc) {
                search_query = "";
        } 
 
+       var searchmodebox = doc.getElementById("searchmodebox");
+
+       var search_mode;
+       
+       if (searchmodebox) {
+               search_mode = searchmodebox[searchmodebox.selectedIndex].text;
+       } else {
+               search_mode = "";
+       }
+
+       setCookie("ttrss_vf_smode", search_mode);
+
        var viewbox = doc.getElementById("viewbox");
 
        var view_mode;
 
        if (viewbox) {
-               view_mode = viewbox.value;
+               view_mode = viewbox[viewbox.selectedIndex].text;
        } else {
                view_mode = "All Posts";
        }
@@ -32,7 +44,7 @@ function viewfeed(feed, skip, subop, doc) {
        var limit;
 
        if (limitbox) {
-               limit = limitbox.value;
+               limit = limitbox[limitbox.selectedIndex].text;
                setCookie("ttrss_vf_limit", limit);
        } else {
                limit = "All";
@@ -56,7 +68,8 @@ function viewfeed(feed, skip, subop, doc) {
 
        var query = "backend.php?op=viewfeed&feed=" + param_escape(feed) +
                "&skip=" + param_escape(skip) + "&subop=" + param_escape(subop) +
-               "&view=" + param_escape(view_mode) + "&limit=" + limit;
+               "&view=" + param_escape(view_mode) + "&limit=" + limit + 
+               "&smode=" + param_escape(search_mode);
 
        if (search_query != "") {
                query = query + "&search=" + param_escape(search_query);
index e18d12bec2ef14b619197310d985a1f9f951a6e5..e6dbc1b9c81d76bc83679381b377a3ed6083a7b2 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -8,11 +8,7 @@ var xmlhttp = false;
 var total_unread = 0;
 var first_run = true;
 
-var search_query = "";
-var search_mode = "";
-
 var display_tags = false;
-//var display_read_feeds = true;
 
 var global_unread = 0;