mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-07 20:00:58 +02:00
rework feed update errors and inactive feeds dialogs
This commit is contained in:
parent
0a13e84edb
commit
e57e73ef29
55
functions.js
55
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -580,15 +580,13 @@
|
|||||||
type=\"checkbox\"></td>";
|
type=\"checkbox\"></td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
|
|
||||||
print "<a target=\"_blank\" class=\"visibleLink\" href=\"".
|
print "<a class=\"visibleLink\" href=\"#\" ".
|
||||||
htmlspecialchars($line["site_url"])."\">".
|
"title=\"".__("Click to edit feed")."\" ".
|
||||||
htmlspecialchars($line["title"])."</a> (".
|
"onclick=\"editFeed(".$line["id"].")\">".
|
||||||
"<a target=\"_blank\" class=\"visibleLink\"
|
htmlspecialchars($line["title"])."</a>";
|
||||||
href=\"".htmlspecialchars($line["feed_url"]).
|
|
||||||
"\">".__("feed")."</a>)";
|
|
||||||
|
|
||||||
print "</td><td class=\"insensitive\" align='right'>";
|
print "</td><td class=\"insensitive\" align='right'>";
|
||||||
print make_local_datetime($link, $line['last_article']);
|
print make_local_datetime($link, $line['last_article'], false);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
@ -611,39 +609,65 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id == "feedUpdateErrors") {
|
if ($id == "feedsWithErrors") {
|
||||||
|
|
||||||
print "<title>".__('Feeds with update errors')."</title>";
|
# print "<title>".__('Feeds with update errors')."</title>";
|
||||||
print "<content><![CDATA[";
|
# print "<content><![CDATA[";
|
||||||
|
|
||||||
print __("These feeds have not been updated because of errors:");
|
print __("These feeds have not been updated because of errors:");
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id,title,feed_url,last_error,site_url
|
$result = db_query($link, "SELECT id,title,feed_url,last_error,site_url
|
||||||
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
|
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
|
||||||
|
|
||||||
print "<ul class='feedErrorsList'>";
|
print "<div class=\"inactiveFeedHolder\">";
|
||||||
|
|
||||||
|
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">";
|
||||||
|
|
||||||
|
$lnum = 1;
|
||||||
|
|
||||||
while ($line = db_fetch_assoc($result)) {
|
while ($line = db_fetch_assoc($result)) {
|
||||||
print "<li><a target=\"_blank\" class=\"visibleLink\" href=\"".
|
|
||||||
htmlspecialchars($line["site_url"])."\">".
|
$class = ($lnum % 2) ? "even" : "odd";
|
||||||
htmlspecialchars($line["title"])."</a> (".
|
$feed_id = $line["id"];
|
||||||
"<a target=\"_blank\" class=\"visibleLink\"
|
$this_row_id = "id=\"FUPDD-$feed_id\"";
|
||||||
href=\"".htmlspecialchars($line["feed_url"]).
|
|
||||||
"\">".__("feed")."</a>): ".
|
print "<tr class=\"\" $this_row_id>";
|
||||||
$line["last_error"]."</li>";
|
|
||||||
|
$edit_title = htmlspecialchars($line["title"]);
|
||||||
|
|
||||||
|
print "<td width='5%' align='center'><input
|
||||||
|
onclick='toggleSelectRow2(this);' dojoType=\"dijit.form.CheckBox\"
|
||||||
|
type=\"checkbox\"></td>";
|
||||||
|
print "<td>";
|
||||||
|
|
||||||
|
print "<a class=\"visibleLink\" href=\"#\" ".
|
||||||
|
"title=\"".__("Click to edit feed")."\" ".
|
||||||
|
"onclick=\"editFeed(".$line["id"].")\">".
|
||||||
|
htmlspecialchars($line["title"])."</a>: ";
|
||||||
|
|
||||||
|
print "<span class=\"insensitive\">";
|
||||||
|
print htmlspecialchars($line["last_error"]);
|
||||||
|
print "</span>";
|
||||||
|
|
||||||
|
print "</td>";
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
|
++$lnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</ul>";
|
print "</table>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
print "<div align='center'>";
|
print "<div class='dlgButtons'>";
|
||||||
|
print "<div style='float : left'>";
|
||||||
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('errorFeedsDlg').removeSelected()\">"
|
||||||
|
.__('Unsubscribe from selected feeds')."</button> ";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\"
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('errorFeedsDlg').hide()\">".
|
||||||
onclick=\"return closeInfoBox()\">".
|
|
||||||
__('Close this window')."</button>";
|
__('Close this window')."</button>";
|
||||||
|
|
||||||
print "]]></content>";
|
print "</div>";
|
||||||
|
|
||||||
//return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id == "editArticleTags") {
|
if ($id == "editArticleTags") {
|
||||||
|
4
prefs.js
4
prefs.js
@ -1159,10 +1159,6 @@ function editFeedCats() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showFeedsWithErrors() {
|
|
||||||
displayDlg('feedUpdateErrors');
|
|
||||||
}
|
|
||||||
|
|
||||||
function showInactiveFeeds() {
|
function showInactiveFeeds() {
|
||||||
try {
|
try {
|
||||||
var query = "backend.php?op=dlg&id=inactiveFeeds";
|
var query = "backend.php?op=dlg&id=inactiveFeeds";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user