print "</div>";
print "<script type=\"text/javascript\">
- update_label_counters('$feed_id');
+ update_all_counters('$feed_id');
</script>";
}
print "<script type=\"text/javascript\">
document.onkeydown = hotkey_handler;
- update_label_counters('$feed');
+ update_all_counters('$feed');
</script>";
if ($addheader) {
if (get_pref($link, 'ENABLE_PREFS_CATCHUP_UNCATCHUP')) {
print "
<input type=\"submit\" class=\"button\"
- onclick=\"javascript:readSelectedFeeds()\" value=\"Mark as read\">
+ onclick=\"javascript:readSelectedFeeds(true)\" value=\"Mark as read\">
<input type=\"submit\" class=\"button\"
- onclick=\"javascript:unreadSelectedFeeds()\"
+ onclick=\"javascript:readSelectedFeeds(false)\"
value=\"Mark as unread\"> ";
}
cleanSelectedList("feedList");
var feedr = document.getElementById("FEEDR-" + feed);
- if (feedr) {
+ if (feedr) {
feedr.className = feedr.className + "Selected";
}
xmlhttp_rpc = new XMLHttpRequest();
}
-function label_counters_callback() {
+function all_counters_callback() {
if (xmlhttp_rpc.readyState == 4) {
if (!xmlhttp_rpc.responseXML) {
- notify("label_counters_callback: backend did not return valid XML");
+ notify("[all_counters_callback] backend did not return valid XML");
return;
}
if (ctr > 0) {
feedctr.className = "odd";
if (!feedr.className.match("Unread")) {
+ var is_selected = feedr.className.match("Selected");
+
+ feedr.className = feedr.className.replace("Selected", "");
+ feedr.className = feedr.className.replace("Unread", "");
+
feedr.className = feedr.className + "Unread";
+
+ if (is_selected) {
+ feedr.className = feedr.className + "Selected";
+ }
+
}
} else {
feedctr.className = "invisible";
}
}
-function update_label_counters(feed) {
+function update_all_counters(feed) {
if (xmlhttp_ready(xmlhttp_rpc)) {
var query = "backend.php?op=rpc&subop=getAllCounters";
}
xmlhttp_rpc.open("GET", query, true);
- xmlhttp_rpc.onreadystatechange=label_counters_callback;
+ xmlhttp_rpc.onreadystatechange=all_counters_callback;
xmlhttp_rpc.send(null);
}
}
}
-function readSelectedFeeds() {
+function readSelectedFeeds(read) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
if (sel_rows.length > 0) {
- notify("Marking selected feeds as read...");
-
- xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=unread&ids="+
- param_escape(sel_rows.toString()), true);
- xmlhttp.onreadystatechange=notify_callback;
- xmlhttp.send(null);
-
- } else {
-
- notify("Please select some feeds first.");
-
- }
-}
-
-function unreadSelectedFeeds() {
-
- if (!xmlhttp_ready(xmlhttp)) {
- printLockingError();
- return
- }
-
- var sel_rows = getSelectedFeeds();
-
- if (sel_rows.length > 0) {
+ if (!read) {
+ op = "unread";
+ } else {
+ op = "read";
+ }
- notify("Marking selected feeds as unread...");
+ notify("Marking selected feeds as " + op + "...");
- xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=unread&ids="+
+ xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=" + op + "&ids="+
param_escape(sel_rows.toString()), true);
xmlhttp.onreadystatechange=notify_callback;
xmlhttp.send(null);
margin : 0px;
}
+/*
li.oddSelected, li.evenSelected {
background-color : white;
}
li.virtUnreadSelected a,
li.virtSelectedUnread a {
color : #5050aa;
+} */
+
+ul.feedlist li.feedSelected a,
+ul.feedlist li.labelSelected a,
+ul.feedlist li.virtSelected a {
+ color : #5050aa;
+}
+
+ul.feedlist li.feedUnreadSelected a,
+ul.feedlist li.labelUnreadSelected a,
+ul.feedlist li.virtUnreadSelected a {
+ color : #5050aa;
+}
+
+ul.feedlist li.feedUnreadSelected ,
+ul.feedlist li.labelUnreadSelected,
+ul.feedlist li.virtUnreadSelected{
+ font-weight : bold;
}
ul.feedList li.feed {
font-size : small;
}
-.evenUnreadSelected, .evenSelectedUnread, {
+.evenUnreadSelected, .evenSelectedUnread {
background-color : #e0e0ff;
font-weight : bold;
}
-.oddUnreadSelected, .oddSelectedUnread, .feedSelectedUnread, {
+.oddUnreadSelected, .oddSelectedUnread {
background-color : #e0e0ff;
font-weight : bold;
}
background-color : #e0e0ff;
}
+/*
.feedUnreadSelected, .feedSelectedUnread,
.virtUnreadSelected, .virtSelectedUnread,
.labelUnreadSelected, .labelSelectedUnread {
background-color : #e0e0ff;
font-weight : bold;
-}
+} */
.feedUnread, .labelUnread, .virtUnread {
font-weight : bold;