From: Andrew Dolgov Date: Tue, 30 Oct 2012 06:24:30 +0000 (+0400) Subject: add special link to cancel current search X-Git-Tag: 1.6.1~41 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=74467907c57d7c51abdf076f8a9c133e1a63ecd2;p=tt-rss.git add special link to cancel current search --- 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); + } +}