diff options
author | Andrew Dolgov <[email protected]> | 2005-11-25 16:38:08 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-25 16:38:08 +0100 |
commit | 4f3a84f4d336a6d9bb1172873a063ff8a8b390ec (patch) | |
tree | d9620e507653d1f5aa326f05772a7200b7484da8 /prefs.js | |
parent | 35f3c923c47a94af018ff2b41d8c37a5956a9d37 (diff) |
cleaned up unread/selected style mess
Diffstat (limited to 'prefs.js')
-rw-r--r-- | prefs.js | 35 |
1 files changed, 8 insertions, 27 deletions
@@ -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..."); - - 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); |