From: Andrew Dolgov Date: Thu, 1 Dec 2005 12:52:18 +0000 (+0100) Subject: UNDO: simplify toggleStarred() for selection X-Git-Tag: schema_feature_freeze_for_1.1~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f1f2db647fb0f853a693a895d65c77292c86ef76;p=tt-rss.git UNDO: simplify toggleStarred() for selection --- diff --git a/viewfeed.js b/viewfeed.js index 126a7692..0dae392d 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -236,7 +236,18 @@ function toggleUnread() { var rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK"); for (i = 0; i < rows.length; i++) { - toggleMark(i); + var row = document.getElementById("RROW-" + rows[i]); + if (row) { + var nc = row.className; + nc = nc.replace("Unread", ""); + nc = nc.replace("Selected", ""); + + if (row.className.match("Unread")) { + row.className = nc + "Selected"; + } else { + row.className = nc + "UnreadSelected"; + } + } } if (rows.length > 0) {