UNDO: simplify toggleStarred() for selection

This commit is contained in:
Andrew Dolgov 2005-12-01 13:52:18 +01:00
parent 372ced8b95
commit f1f2db647f
1 changed files with 12 additions and 1 deletions

View File

@ -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) {