1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 14:45:57 +00:00

display special dialog when new articles are available in the current feed instead of reloading it

This commit is contained in:
Andrew Dolgov
2009-10-13 19:05:36 +04:00
parent f4280bdd13
commit 37e93d6cca
4 changed files with 42 additions and 2 deletions

View File

@@ -532,7 +532,7 @@ function parse_counters(reply, scheduled_call) {
if (feedctr && feedu && feedr) {
if (feedu.innerHTML != ctr && id == getActiveFeedId() && scheduled_call) {
viewCurrentFeed();
displayNewContentPrompt(id);
}
var row_needs_hl = (ctr > 0 && ctr > parseInt(feedu.innerHTML));
@@ -2194,4 +2194,25 @@ function hotkey_prefix_timeout() {
}
}
function hideAuxDlg() {
try {
Element.hide('auxDlg');
} catch (e) {
exception_error("hideAuxDlg", e);
}
}
function displayNewContentPrompt(id) {
try {
var msg = __("New articles in &laquo;%s&raquo;. <a href='#' onclick='viewCurrentFeed()'>Click to view</a>.");
msg = msg.replace("%s", getFeedName(id));
$('auxDlg').innerHTML = msg;
Element.show('auxDlg');
} catch (e) {
exception_error("displayNewContentPrompt", e);
}
}