1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-23 04:31:28 +00:00

cleaned up unread/selected style mess

This commit is contained in:
Andrew Dolgov
2005-11-25 16:38:08 +01:00
parent 35f3c923c4
commit 4f3a84f4d3
5 changed files with 50 additions and 39 deletions

View File

@@ -448,7 +448,7 @@ function getSelectedFeedCats() {
}
function readSelectedFeeds() {
function readSelectedFeeds(read) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
@@ -459,34 +459,15 @@ function readSelectedFeeds() {
if (sel_rows.length > 0) {
notify("Marking selected feeds as read...");
if (!read) {
op = "unread";
} else {
op = "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);
notify("Marking selected feeds as " + op + "...");
} else {
notify("Please select some feeds first.");
}
}
function unreadSelectedFeeds() {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
return
}
var sel_rows = getSelectedFeeds();
if (sel_rows.length > 0) {
notify("Marking selected feeds as unread...");
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);