summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-09-11 07:06:25 +0100
committerAndrew Dolgov <[email protected]>2008-09-11 07:06:25 +0100
commit758e1c4ad905d10a31e0749ec22973b8a4055764 (patch)
treed35436174be9119a19743e258dd31c1245b557f3 /prefs.js
parenta411875be5c37256c27d27adee7588a8acbc7104 (diff)
implement (incomplete) batch feed editor
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js78
1 files changed, 78 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index 7baea6a20..b8422391c 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1188,6 +1188,34 @@ function editSelectedFeed() {
}
+function editSelectedFeeds() {
+
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
+ }
+
+ var rows = getSelectedFeeds();
+
+ if (rows.length == 0) {
+ alert(__("No feeds are selected."));
+ return;
+ }
+
+ notify("");
+
+ disableHotkeys();
+
+ notify_progress("Loading, please wait...");
+
+ xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=editfeeds&ids=" +
+ param_escape(rows.toString()), true);
+
+ xmlhttp.onreadystatechange=infobox_callback;
+ xmlhttp.send(null);
+
+}
+
function editSelectedFeedCat() {
var rows = getSelectedFeedCats();
@@ -2096,6 +2124,10 @@ function feedActionGo(op) {
removeSelectedFeeds();
}
+ if (op == "facBatchEdit") {
+ editSelectedFeeds();
+ }
+
} catch (e) {
exception_error("feedActionGo", e);
@@ -2210,3 +2242,49 @@ function unsubscribeFeed(id, title) {
}
+function feedsEditSave() {
+ try {
+
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
+ }
+
+ var query = Form.serialize("batch_edit_feed_form");
+
+ alert(query);
+
+ return false;
+ } catch (e) {
+ exception_error("feedsEditSave", e);
+ }
+}
+
+function batchFeedsToggleField(cb, elem, label) {
+ try {
+ var f = document.forms["batch_edit_feed_form"];
+ var l = document.getElementById(label);
+
+ if (cb.checked) {
+ f[elem].disabled = false;
+
+ if (l) {
+ l.className = "";
+ };
+
+// new Effect.Highlight(f[elem], {duration: 1, startcolor: "#fff7d5",
+// queue: { position:'end', scope: 'BPEFQ', limit: 1 } } );
+
+ } else {
+ f[elem].disabled = true;
+
+ if (l) {
+ l.className = "insensitive";
+ };
+
+ }
+ } catch (e) {
+ exception_error("batchFeedsToggleField", e);
+ }
+}
+