From 74467907c57d7c51abdf076f8a9c133e1a63ecd2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 30 Oct 2012 10:24:30 +0400 Subject: [PATCH] add special link to cancel current search --- classes/feeds.php | 3 +++ js/viewfeed.js | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/classes/feeds.php b/classes/feeds.php index e6c9e0e3..8dad1658 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -59,6 +59,7 @@ class Feeds extends Handler_Protected { // right part $reply .= ""; + $reply .= ""; if ($feed_site_url) { $target = "target=\"_blank\""; @@ -73,6 +74,8 @@ class Feeds extends Handler_Protected { $reply .= $feed_title; } + $reply .= ""; + $reply .= " " + __("Cancel search") + ")" + + ""; + } + } else { if (headlines_count > 0 && feed_id == getActiveFeedId() && is_cat == activeFeedIsCat()) { @@ -2123,4 +2129,11 @@ function precache_headlines() { } } - +function cancelSearch() { + try { + _search_query = ""; + viewCurrentFeed(); + } catch (e) { + exception_error("cancelSearch", e); + } +} -- 2.39.5