summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--images/alert.pngbin0 -> 340 bytes
-rw-r--r--images/alert.svg87
-rw-r--r--index.php4
-rw-r--r--js/tt-rss.js8
-rw-r--r--js/viewfeed.js7
5 files changed, 102 insertions, 4 deletions
diff --git a/images/alert.png b/images/alert.png
new file mode 100644
index 000000000..9687c4cf1
--- /dev/null
+++ b/images/alert.png
Binary files differ
diff --git a/images/alert.svg b/images/alert.svg
new file mode 100644
index 000000000..237f66caf
--- /dev/null
+++ b/images/alert.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16px"
+ height="16px"
+ id="svg2985"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ inkscape:export-filename="Y:\public_html\testbox\tt-irc\images\alert.png"
+ inkscape:export-xdpi="102.17"
+ inkscape:export-ydpi="102.17"
+ sodipodi:docname="alert.svg">
+ <defs
+ id="defs2987" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.197802"
+ inkscape:cx="0.97227717"
+ inkscape:cy="13.508447"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:window-width="1600"
+ inkscape:window-height="1137"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2990">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="star"
+ style="opacity:1;fill:#d40000;fill-opacity:1"
+ id="path2993"
+ sodipodi:sides="3"
+ sodipodi:cx="4.7752476"
+ sodipodi:cy="2.3499999"
+ sodipodi:r1="8.1370182"
+ sodipodi:r2="4.0685091"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="false"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="m 11.822112,6.418509 -7.0468643,0 -7.0468646,0 3.5234322,-6.10276355 3.5234323,-6.10276375 3.5234322,6.10276356 z"
+ inkscape:transform-center-y="-2.0342545"
+ transform="translate(3.2247524,7.6842546)" />
+ <text
+ xml:space="preserve"
+ style="font-size:11px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Times New Roman;-inkscape-font-specification:Sans Bold"
+ x="6.1657715"
+ y="12.508285"
+ id="text3767"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3769"
+ x="6.1657715"
+ y="12.508285">!</tspan></text>
+ </g>
+</svg>
diff --git a/index.php b/index.php
index 24ab0912c..f07ee056a 100644
--- a/index.php
+++ b/index.php
@@ -114,6 +114,10 @@
</div>
<div id="header">
+ <img id="net-alert" style="display : none"
+ title="<?php echo __("Communication problem with server.") ?>"
+ src="<?php echo theme_image($link, 'images/alert.png') ?>"/>
+
<?php if (!$_SESSION["hide_hello"]) { ?>
<?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
<?php } ?>
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 5cbfbfa6e..3a83644d4 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -961,12 +961,16 @@ function handle_rpc_json(transport, scheduled_call) {
hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
+ Element.hide("net-alert");
+
} else {
- notify_error("Error communicating with server.");
+ //notify_error("Error communicating with server.");
+ Element.show("net-alert");
}
} catch (e) {
- notify_error("Error communicating with server.");
+ Element.show("net-alert");
+ //notify_error("Error communicating with server.");
console.log(e);
//exception_error("handle_rpc_json", e, transport);
}
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 225c12312..d6801a186 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -210,7 +210,8 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
__('Could not update headlines (invalid object received - see error console for details)') +
"</div>");
} else {
- notify_error("Error communicating with server.");
+ //notify_error("Error communicating with server.");
+ Element.show("net-alert");
}
_infscroll_request_sent = 0;
@@ -315,11 +316,13 @@ function article_callback2(transport, id) {
// return;
// }
- } else {
+ } else if (transport.responseText) {
console.error("Invalid object received: " + transport.responseText);
render_article("<div class='whiteBox'>" +
__('Could not display article (invalid object received - see error console for details)') + "</div>");
+ } else {
+ Element.show("net-alert");
}
request_counters();