From: Andrew Dolgov Date: Sat, 19 Nov 2005 14:27:06 +0000 (+0100) Subject: fix global search X-Git-Tag: schema_feature_freeze_for_1.1~186 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ab9d9e8df4c4a0f8f33b805f72b74bc977336b2a;p=tt-rss.git fix global search --- diff --git a/feedlist.js b/feedlist.js index ebaea0de..93b59814 100644 --- a/feedlist.js +++ b/feedlist.js @@ -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); diff --git a/tt-rss.js b/tt-rss.js index e18d12be..e6dbc1b9 100644 --- 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;