diff options
author | Andrew Dolgov <[email protected]> | 2011-04-08 15:37:50 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-04-08 15:37:50 +0400 |
commit | e57e73ef29e050fd33223b009397c5d6c13d38e9 (patch) | |
tree | fa39685f4ed1a7e0e93039e8d7500cc11b6b08dd /functions.js | |
parent | 0a13e84edb1c2cbd0b11c06b1e4fa01680611339 (diff) |
rework feed update errors and inactive feeds dialogs
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/functions.js b/functions.js index e9a6d928c..3b18b0072 100644 --- a/functions.js +++ b/functions.js @@ -1521,4 +1521,59 @@ function feedBrowser() { } } +function showFeedsWithErrors() { + try { + var query = "backend.php?op=dlg&id=feedsWithErrors"; + + if (dijit.byId("errorFeedsDlg")) + dijit.byId("errorFeedsDlg").destroyRecursive(); + + dialog = new dijit.Dialog({ + id: "errorFeedsDlg", + title: __("Feeds with update errors"), + style: "width: 600px", + getSelectedFeeds: function() { + return getSelectedTableRowIds("prefErrorFeedList"); + }, + removeSelected: function() { + var sel_rows = this.getSelectedFeeds(); + + console.log(sel_rows); + + if (sel_rows.length > 0) { + var ok = confirm(__("Remove selected feeds?")); + + if (ok) { + notify_progress("Removing selected feeds...", true); + + var query = "?op=pref-feeds&subop=remove&ids="+ + param_escape(sel_rows.toString()); + + new Ajax.Request("backend.php", { + parameters: query, + onComplete: function(transport) { + notify(''); + dialog.hide(); + updateFeedList(); + } }); + } + + } else { + alert(__("No feeds are selected.")); + } + }, + execute: function() { + if (this.validate()) { + } + }, + href: query}); + + dialog.show(); + + } catch (e) { + exception_error("showFeedsWithErrors", e); + } + +} + |