]> git.wh0rd.org - tt-rss.git/commitdiff
display special dialog when new articles are available in the current feed instead...
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 13 Oct 2009 15:05:36 +0000 (19:05 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 13 Oct 2009 15:05:36 +0000 (19:05 +0400)
feedlist.js
functions.js
tt-rss.css
tt-rss.php

index 860122bd0244fe8a9c2c9fae86042633197e8431..bfd14376c3c393aeafb0c83d7f4966f9cc3b9837 100644 (file)
@@ -157,7 +157,7 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
                }
 
                enableHotkeys();
-
+               hideAuxDlg();
                closeInfoBox();
 
                Form.enable("main_toolbar_form");
index 22490fd1c4ec5392e02d8d342e19ddedc9ad1b5f..fcfddaa52f2778ecadf4891172fb411c8d347b90 100644 (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);
+       }
+}
index 4510ad705fdbd1c95fd08ade27d439d184bc910d..a41d49d791941dfe57832908351b37a46533f7ea 100644 (file)
@@ -2238,3 +2238,21 @@ div#cmdline {
        height : 18px;
        width : 18px;
 }
+
+div#auxDlg {
+       position : absolute;
+       z-index : 3;
+       bottom : 10px;
+       right : 10px;
+       padding : 5px;
+       border-width : 1px;
+       border-style : solid;
+       border-color : #d7c47a;
+       background-color : #fff7d5;
+       color : black;
+       text-align : center;
+}
+
+div#auxDlg a {
+       color : #4684ff;
+}
index 1dcee23a4fede2ef30a86722bff55dc637d03531..7b87c320f2bcc9ab1e3f4cb5173f952d3ed6e110 100644 (file)
@@ -105,6 +105,7 @@ window.onload = init;
 <div id="infoBoxShadow" style="display : none"><div id="infoBox">&nbsp;</div></div>
 
 <div id="cmdline" style="display : none"></div>
+<div id="auxDlg" style="zdisplay : none"></div>
 
 <div id="errorBoxShadow" style="display : none">
        <div id="errorBox">