summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-01-27 10:21:55 +0100
committerAndrew Dolgov <[email protected]>2007-01-27 10:21:55 +0100
commitef16ae378238fa868d282da5c4f77d8556534af4 (patch)
tree529a727d924c20c928c98c5c0e8ca5cbf22d4117
parentc50e2b3004252f5f775741020003c5935560f0f7 (diff)
rework no daemon warning
-rw-r--r--functions.js4
-rw-r--r--modules/popup-dialog.php23
-rw-r--r--tt-rss.css5
-rw-r--r--tt-rss.js8
-rw-r--r--tt-rss.php6
5 files changed, 38 insertions, 8 deletions
diff --git a/functions.js b/functions.js
index 26f3f4bfb..17370dfdd 100644
--- a/functions.js
+++ b/functions.js
@@ -1576,3 +1576,7 @@ function filterDlgCheckAction(sender) {
}
}
+
+function explainError(code) {
+ return displayDlg("explainError", code);
+}
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 8a3478c8c..414e01006 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -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>";
diff --git a/tt-rss.css b/tt-rss.css
index ac44a1b4b..5cf0ce7f5 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -242,6 +242,11 @@ input.editbox {
color : black;
}
+.notifyError span:hover {
+ color : red;
+ cursor : pointer;
+}
+
#dispSwitch {
font-size : x-small;
text-align : right;
diff --git a/tt-rss.js b/tt-rss.js
index 0e4c15485..0e0886b85 100644
--- 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;
}
}
diff --git a/tt-rss.php b/tt-rss.php
index d68469861..57a750c59 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -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>