diff options
author | Andrew Dolgov <[email protected]> | 2006-01-09 10:47:02 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-01-09 10:47:02 +0100 |
commit | 49b7cbd3518828e35f37ce2ce87cc7038de1d567 (patch) | |
tree | df96674a545f61eaac8e10f84fb002bd29672ac1 | |
parent | 8e84993bf96a7a53b56fa5c2b791a023f2877fb0 (diff) |
various search-related improvements
-rw-r--r-- | backend.php | 18 | ||||
-rw-r--r-- | feedlist.js | 1 | ||||
-rw-r--r-- | tt-rss.js | 4 |
3 files changed, 16 insertions, 7 deletions
diff --git a/backend.php b/backend.php index 2dba06efd..f32b8c214 100644 --- a/backend.php +++ b/backend.php @@ -1198,9 +1198,9 @@ $feed_title = ""; if ($search && $search_mode == "All feeds") { - $feed_title = "Search results"; + $feed_title = "Global search results ($search)"; } else if (sprintf("%d", $feed) == 0) { - $feed_title = $feed; + $feed_title = "Feed search results ($search, $feed)"; } else if ($feed > 0) { $result = db_query($link, "SELECT title,site_url,last_error FROM ttrss_feeds WHERE id = '$feed'"); @@ -3047,13 +3047,21 @@ if ($id == "search") { + $active_feed_id = db_escape_string($_GET["param"]); + print "<input id=\"searchbox\" class=\"extSearch\" onblur=\"javascript:enableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onchange=\"javascript:search()\"> <select id=\"searchmodebox\"> - <option selected>All feeds</option> - <option>This feed</option> - </select> + <option selected>All feeds</option>"; + + if ($active_feed_id) { + print "<option>This feed</option>"; + } else { + print "<option disabled>This feed</option>"; + } + + print "</select> <input type=\"submit\" class=\"button\" onclick=\"javascript:search()\" value=\"Search\"> <input class=\"button\" diff --git a/feedlist.js b/feedlist.js index 0276fd0e9..8bb3a16b2 100644 --- a/feedlist.js +++ b/feedlist.js @@ -95,6 +95,7 @@ function viewfeed(feed, skip, subop, doc) { if (search_query != "") { query = query + "&search=" + param_escape(search_query); + searchbox.value = ""; } var headlines_frame = parent.frames["headlines-frame"]; @@ -266,7 +266,7 @@ function resetSearch() { } function search() { - closeDlg(); + closeDlg(); viewCurrentFeed(0, ""); } @@ -411,7 +411,7 @@ function quickMenuGo() { } if (opid == "qmcSearch") { - displayDlg("search"); + displayDlg("search", getActiveFeedId()); return; } |