add special link to cancel current search
This commit is contained in:
parent
24be5e836f
commit
74467907c5
2 changed files with 17 additions and 1 deletions
|
@ -59,6 +59,7 @@ class Feeds extends Handler_Protected {
|
||||||
// right part
|
// right part
|
||||||
|
|
||||||
$reply .= "<span class='r'>";
|
$reply .= "<span class='r'>";
|
||||||
|
$reply .= "<span id='feed_title'>";
|
||||||
|
|
||||||
if ($feed_site_url) {
|
if ($feed_site_url) {
|
||||||
$target = "target=\"_blank\"";
|
$target = "target=\"_blank\"";
|
||||||
|
@ -73,6 +74,8 @@ class Feeds extends Handler_Protected {
|
||||||
$reply .= $feed_title;
|
$reply .= $feed_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$reply .= "</span>";
|
||||||
|
|
||||||
$reply .= "
|
$reply .= "
|
||||||
<a href=\"#\"
|
<a href=\"#\"
|
||||||
title=\"".__("View as RSS feed")."\"
|
title=\"".__("View as RSS feed")."\"
|
||||||
|
|
|
@ -98,6 +98,12 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
||||||
|
|
||||||
initHeadlinesMenu();
|
initHeadlinesMenu();
|
||||||
|
|
||||||
|
if (_search_query) {
|
||||||
|
$("feed_title").innerHTML += "<span id='cancel_search'>" +
|
||||||
|
" (<a href='#' onclick='cancelSearch()'>" + __("Cancel search") + "</a>)" +
|
||||||
|
"</span>";
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (headlines_count > 0 && feed_id == getActiveFeedId() && is_cat == activeFeedIsCat()) {
|
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 a new issue