1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 13:45:56 +00:00

prefs: implement batch subscribe to feeds

This commit is contained in:
Andrew Dolgov
2012-01-29 17:51:00 +04:00
parent 5081319e23
commit 33f0fdd0a2
4 changed files with 131 additions and 0 deletions

View File

@@ -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);
}
}