summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-08-22 06:38:07 +0100
committerAndrew Dolgov <[email protected]>2005-08-22 06:38:07 +0100
commit0e091d38cf6419edf5e623a584dc28a404fc2613 (patch)
tree7d9af545603150a9f9fe4b1abab4fc091dda07d0 /prefs.js
parent7726fa023cc4430a71840012d99ec32e1c1126de (diff)
prefs RPC optimizations
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/prefs.js b/prefs.js
index 001d5b0a8..192e194fe 100644
--- a/prefs.js
+++ b/prefs.js
@@ -32,7 +32,14 @@ function feedlist_callback() {
}
}
-function update_feeds() {
+function notify_callback() {
+ var container = document.getElementById('notify');
+ if (xmlhttp.readyState == 4) {
+ container.innerHTML=xmlhttp.responseText;
+ }
+}
+
+function updateFeedList() {
document.getElementById("feeds").innerHTML = "Loading feeds, please wait...";
@@ -111,9 +118,9 @@ function readSelectedFeeds() {
notify("Marking selected feeds as read...");
- xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=unread&ids="+
+ xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=unread&ids="+
param_escape(sel_rows.toString()), true);
- xmlhttp.onreadystatechange=feedlist_callback;
+ xmlhttp.onreadystatechange=notify_callback;
xmlhttp.send(null);
} else {
@@ -131,9 +138,9 @@ function unreadSelectedFeeds() {
notify("Marking selected feeds as unread...");
- xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=unread&ids="+
+ xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=unread&ids="+
param_escape(sel_rows.toString()), true);
- xmlhttp.onreadystatechange=feedlist_callback;
+ xmlhttp.onreadystatechange=notify_callback;
xmlhttp.send(null);
} else {
@@ -166,7 +173,7 @@ function removeSelectedFeeds() {
function init() {
- update_feeds();
+ updateFeedList();
notify("");