1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

headlines toolbar: code cleanup

This commit is contained in:
Andrew Dolgov
2009-01-21 05:04:57 +01:00
parent b62f6ff448
commit d75ed3eba5
3 changed files with 46 additions and 149 deletions

View File

@@ -177,8 +177,6 @@ function headlines_callback2(transport, feed_cur_page) {
markHeadline(ids[i]);
}
subtoolbarSearch();
} else {
debug("no new headlines received");
}
@@ -1822,44 +1820,6 @@ function fixHeadlinesOrder(ids) {
}
}
function subtoolbarSearch() {
try {
var q = document.getElementById("subtoolbar_search_box");
if (!q) return;
q = q.value.toUpperCase();
var ids = false;
var vis_ids = new Array();
if (document.getElementById("headlinesList")) {
ids = getVisibleHeadlineIds();
} else {
ids = cdmGetVisibleArticles();
}
for (var i = 0; i < ids.length; i++) {
var title = document.getElementById("RTITLE-" + ids[i]);
if (title) {
if (!title.innerHTML.toUpperCase().match(q)) {
Element.hide(document.getElementById("RROW-" + ids[i]));
} else {
Element.show(document.getElementById("RROW-" + ids[i]));
vis_ids.push(ids[i]);
}
}
}
fixHeadlinesOrder(vis_ids);
} catch (e) {
exception_error("subtoolbarSearch", e);
}
}
function hideReadHeadlines() {
try {