1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 02:06:48 +00:00

rework feed update errors and inactive feeds dialogs

This commit is contained in:
Andrew Dolgov
2011-04-08 15:37:50 +04:00
parent 0a13e84edb
commit e57e73ef29
4 changed files with 104 additions and 33 deletions

View File

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