summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-12-30 06:17:23 +0100
committerAndrew Dolgov <[email protected]>2005-12-30 06:17:23 +0100
commitc6232e43333ff070cc16d3346369a1712966f68f (patch)
tree89fddac678107b82cc081f3b4039d922e81c2619 /prefs.js
parent88d9259a4e9ddda474f448df66f73ef8a1dc4a7d (diff)
initial work on big feed browser
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js59
1 files changed, 58 insertions, 1 deletions
diff --git a/prefs.js b/prefs.js
index a4096df56..2a8a42d44 100644
--- a/prefs.js
+++ b/prefs.js
@@ -5,8 +5,8 @@ var active_feed_cat = false;
var active_filter = false;
var active_label = false;
var active_user = false;
-
var active_tab = false;
+var feed_to_expand = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
@@ -27,6 +27,19 @@ if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
+function expand_feed_callback() {
+ if (xmlhttp.readyState == 4) {
+ try {
+ var container = document.getElementById("BRDET-" + feed_to_expand);
+ container.innerHTML=xmlhttp.responseText;
+ container.style.display = "block";
+ p_notify("");
+ } catch (e) {
+ exception_error("expand_feed_callback", e);
+ }
+ }
+}
+
function feedlist_callback() {
if (xmlhttp.readyState == 4) {
try {
@@ -96,6 +109,14 @@ function labellist_callback() {
}
}
+function feed_browser_callback() {
+ var container = document.getElementById('prefContent');
+ if (xmlhttp.readyState == 4) {
+ container.innerHTML=xmlhttp.responseText;
+ p_notify("");
+ }
+}
+
function userlist_callback() {
var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
@@ -1202,6 +1223,8 @@ function selectTab(id) {
updatePrefsList();
} else if (id == "userConfig") {
updateUsersList();
+ } else if (id == "feedBrowser") {
+ updateBigFeedBrowser();
}
var tab = document.getElementById(active_tab + "Tab");
@@ -1334,3 +1357,37 @@ function feedBrowserSubscribe() {
exception_error("feedBrowserSubscribe", e);
}
}
+
+function updateBigFeedBrowser() {
+
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
+ }
+
+ p_notify("Loading, please wait...");
+
+ xmlhttp.open("GET", "backend.php?op=pref-feed-browser", true);
+ xmlhttp.onreadystatechange=feed_browser_callback;
+ xmlhttp.send(null);
+
+}
+
+function browserExpand(id) {
+ try {
+/* if (feed_to_expand && feed_to_expand != id) {
+ var d = document.getElementById("BRDET-" + feed_to_expand);
+ d.style.display = "none";
+ } */
+
+ feed_to_expand = id;
+
+ xmlhttp.open("GET", "backend.php?op=pref-feed-browser&subop=details&id="
+ + param_escape(id), true);
+ xmlhttp.onreadystatechange=expand_feed_callback;
+ xmlhttp.send(null);
+
+ } catch (e) {
+ exception_error("browserExpand", e);
+ }
+}