1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-26 00:51:29 +00:00

add special link to cancel current search

This commit is contained in:
Andrew Dolgov
2012-10-30 10:24:30 +04:00
parent 24be5e836f
commit 74467907c5
2 changed files with 17 additions and 1 deletions

View File

@@ -98,6 +98,12 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
initHeadlinesMenu();
if (_search_query) {
$("feed_title").innerHTML += "<span id='cancel_search'>" +
" (<a href='#' onclick='cancelSearch()'>" + __("Cancel search") + "</a>)" +
"</span>";
}
} 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);
}
}