]> git.wh0rd.org Git - tt-rss.git/commitdiff
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 0dae392df3750041ad724b51078104db74641c0b..126a769204b428f228c03d1fe054a9fb6eea5fd8 100644 (file)
@@ -236,18 +236,7 @@ function toggleUnread() {
                var rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
 
                for (i = 0; i < rows.length; 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";
-                               }
-                       }
+                       toggleMark(i);
                }
 
                if (rows.length > 0) {