From 33f0fdd0a21ca7999e2d9d1a8db438711e518587 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 29 Jan 2012 17:51:00 +0400 Subject: prefs: implement batch subscribe to feeds --- js/prefs.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'js/prefs.js') 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); + } +} -- cgit v1.2.3