From 37e93d6ccae51c283f3b480195016d749ecab1a5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 13 Oct 2009 19:05:36 +0400 Subject: display special dialog when new articles are available in the current feed instead of reloading it --- functions.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'functions.js') diff --git a/functions.js b/functions.js index 22490fd1c..fcfddaa52 100644 --- a/functions.js +++ b/functions.js @@ -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 «%s». Click to view."); + msg = msg.replace("%s", getFeedName(id)); + + $('auxDlg').innerHTML = msg; + + Element.show('auxDlg'); + + } catch (e) { + exception_error("displayNewContentPrompt", e); + } +} -- cgit v1.2.3