]> git.wh0rd.org Git - tt-rss.git/commitdiff
UNDO: simplify toggleStarred() for selection
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 1 Dec 2005 12:52:18 +0000 (13:52 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 1 Dec 2005 12:52:18 +0000 (13:52 +0100)
viewfeed.js

index 126a769204b428f228c03d1fe054a9fb6eea5fd8..0dae392df3750041ad724b51078104db74641c0b 100644 (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) {