1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-24 02:11:29 +00:00

offline: actions dropdown works

This commit is contained in:
Andrew Dolgov
2009-02-15 22:41:16 +03:00
parent d7a1dbbd88
commit 46b84d2998
2 changed files with 30 additions and 6 deletions

View File

@@ -575,7 +575,7 @@ function toggleMark(id, client_only, no_effects) {
}
update_local_feedlist_counters();
if (!no_effects) update_local_feedlist_counters();
if (!client_only) {
debug(query);
@@ -973,20 +973,34 @@ function selectionToggleUnread(cdm_mode, set_state, callback_func, no_error) {
} else {
row.className = nc + "UnreadSelected";
}
if (db) {
db.execute("UPDATE articles SET unread = NOT unread WHERE id = ?",
[rows[i]]);
}
}
if (set_state == false) {
row.className = nc + "Selected";
if (db) {
db.execute("UPDATE articles SET unread = 0 WHERE id = ?",
[rows[i]]);
}
}
if (set_state == true) {
row.className = nc + "UnreadSelected";
if (db) {
db.execute("UPDATE articles SET unread = 1 WHERE id = ?",
[rows[i]]);
}
}
}
}
if (rows.length > 0) {
update_local_feedlist_counters();
var cmode = "";
if (set_state == undefined) {
@@ -1034,6 +1048,8 @@ function selectionToggleMarked(cdm_mode) {
toggleMark(rows[i], true, true);
}
update_local_feedlist_counters();
if (rows.length > 0) {
var query = "backend.php?op=rpc&subop=markSelected&ids=" +