add special link to cancel current search
This commit is contained in:
parent
24be5e836f
commit
74467907c5
|
@ -59,6 +59,7 @@ class Feeds extends Handler_Protected {
|
|||
// right part
|
||||
|
||||
$reply .= "<span class='r'>";
|
||||
$reply .= "<span id='feed_title'>";
|
||||
|
||||
if ($feed_site_url) {
|
||||
$target = "target=\"_blank\"";
|
||||
|
@ -73,6 +74,8 @@ class Feeds extends Handler_Protected {
|
|||
$reply .= $feed_title;
|
||||
}
|
||||
|
||||
$reply .= "</span>";
|
||||
|
||||
$reply .= "
|
||||
<a href=\"#\"
|
||||
title=\"".__("View as RSS feed")."\"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue