]> git.wh0rd.org - tt-rss.git/commitdiff
rework no daemon warning
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 27 Jan 2007 09:21:55 +0000 (10:21 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 27 Jan 2007 09:21:55 +0000 (10:21 +0100)
functions.js
modules/popup-dialog.php
tt-rss.css
tt-rss.js
tt-rss.php

index 26f3f4bfb1e972255913626d5d80e429b26e3cb1..17370dfdd159c4967a55c16789489546b597cf41 100644 (file)
@@ -1576,3 +1576,7 @@ function filterDlgCheckAction(sender) {
        }
 
 }
+
+function explainError(code) {
+       return displayDlg("explainError", code);
+}
index 8a3478c8c2e3368b25b5ca1475c5eeee6545f96e..414e01006e211585d1ad574063491671b23c1e4b 100644 (file)
@@ -3,6 +3,29 @@
                $id = $_GET["id"];
                $param = db_escape_string($_GET["param"]);
 
+               if ($id == "explainError") {
+
+                       print "<div id=\"infoBoxTitle\">Error message</div>";
+                       print "<div class=\"infoBoxContents\">";
+
+                       if ($param == 1) {
+                               print _("Update daemon is enabled in configuration, but daemon
+                                       process is not running, which prevents all feeds from updating. Please
+                                       start the daemon process or contact instance owner.");
+                       }
+
+                       print "</div>";
+
+                       print "<div align='center'>";
+
+                       print "<input class=\"button\"
+                               type=\"submit\" onclick=\"return closeInfoBox()\" 
+                               value=\"Close\">";
+
+                       print "</div>";
+
+               }
+
                if ($id == "quickAddFeed") {
 
                        print "<div id=\"infoBoxTitle\">Subscribe to feed</div>";
index ac44a1b4bcf256ce12042c859585e69087e5547a..5cf0ce7f594823f7f35eea7c7bef8cf225aa0fbe 100644 (file)
@@ -242,6 +242,11 @@ input.editbox {
        color : black;
 }
 
+.notifyError span:hover {
+       color : red;
+       cursor : pointer;
+}
+
 #dispSwitch {
        font-size : x-small;
        text-align : right;
index 0e4c15485995af926e5a53860314a91a9c730f57..0e0886b8526fafc5d7f278be9ab20b7840e2d822 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -539,7 +539,11 @@ function parse_runtime_info(elem) {
 
                debug("RI: " + k + " => " + v);
 
-               var w = document.getElementById("noDaemonWarning");
+               if (k == "daemon_is_running" && v != 1) {
+                       notify("<span onclick=\"javascript:explainError(1)\">Warning: Update daemon is not runing.</span>", true, true);
+               }
+
+/*             var w = document.getElementById("noDaemonWarning");
                
                if (w) {
                        if (k == "daemon_is_running" && v != 1) {
@@ -547,7 +551,7 @@ function parse_runtime_info(elem) {
                        } else {
                                w.style.display = "none";
                        }
-               }
+               } */
                param = param.nextSibling;
        }
 }
index d68469861f42a3baf9b9da725a8219d5ac8e3ab6..57a750c595e5e909eebf7ecf9377444f63f15a3a 100644 (file)
@@ -97,12 +97,6 @@ if (document.addEventListener) {
 window.onload = init;
 </script>
 
-<div id="noDaemonWarning">
-       <?php echo _("<b>Warning:</b> Update daemon is enabled in configuration, but daemon
-       process is not running, which prevents all feeds from updating. Please
-       start the daemon process or contact instance owner.") ?>
-</div>
-
 <ul id="debug_output"></ul>
 
 <div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>