1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:15:55 +00:00

use css nth-child instead of old even/odd class hacks for normal mode

This commit is contained in:
Andrew Dolgov
2013-05-04 12:01:53 +04:00
parent 72c29b65d4
commit 8d090a910b
6 changed files with 6 additions and 55 deletions

View File

@@ -134,8 +134,6 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
if (!hsp) hsp = new Element("DIV", {"id": "headlines-spacer"});
fixHeadlinesOrder(getLoadedArticleIds());
if (getInitParam("cdm_auto_catchup") == 1) {
c.domNode.appendChild(hsp);
}
@@ -1496,26 +1494,6 @@ function cdmExpandArticle(id, noexpand) {
return false;
}
function fixHeadlinesOrder(ids) {
try {
for (var i = 0; i < ids.length; i++) {
var e = $("RROW-" + ids[i]);
if (e) {
if (i % 2 == 0) {
e.removeClassName("even");
e.addClassName("odd");
} else {
e.removeClassName("odd");
e.addClassName("even");
}
}
}
} catch (e) {
exception_error("fixHeadlinesOrder", e);
}
}
function getArticleUnderPointer() {
return post_under_pointer;
}
@@ -1596,7 +1574,6 @@ function dismissSelectedArticles() {
if (sel.length > 0)
selectionToggleUnread(false);
fixHeadlinesOrder(tmp);
} catch (e) {
exception_error("dismissSelectedArticles", e);
@@ -1621,8 +1598,6 @@ function dismissReadArticles() {
}
}
fixHeadlinesOrder(tmp);
} catch (e) {
exception_error("dismissSelectedArticles", e);
}