summaryrefslogtreecommitdiff
path: root/js/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-01-29 17:51:00 +0400
committerAndrew Dolgov <[email protected]>2012-01-29 17:51:00 +0400
commit33f0fdd0a21ca7999e2d9d1a8db438711e518587 (patch)
tree4829fd4c4d03e9f89adced99036a63cd1fc5a231 /js/prefs.js
parent5081319e23daad80694701866e7aa0297f02ca53 (diff)
prefs: implement batch subscribe to feeds
Diffstat (limited to 'js/prefs.js')
-rw-r--r--js/prefs.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/js/prefs.js b/js/prefs.js
index ce233b749..a151cbedf 100644
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -2073,4 +2073,35 @@ function gotoExportOpml(filename, settings) {
}
+function batchSubscribe() {
+ try {
+ var query = "backend.php?op=dlg&method=batchSubscribe";
+
+ if (dijit.byId("batchSubDlg"))
+ dijit.byId("batchSubDlg").destroyRecursive();
+
+ var dialog = new dijit.Dialog({
+ id: "batchSubDlg",
+ title: __("Batch subscribe"),
+ style: "width: 600px",
+ execute: function() {
+ if (this.validate()) {
+ console.log(dojo.objectToQuery(this.attr('value')));
+
+ notify_progress(__("Subscribing to feeds..."), true);
+
+ new Ajax.Request("backend.php", {
+ parameters: dojo.objectToQuery(this.attr('value')),
+ onComplete: function(transport) {
+ this.hide();
+ } });
+ }
+ },
+ href: query});
+
+ dialog.show();
+ } catch (e) {
+ exception_error("batchSubscribe", e);
+ }
+}