add net-alert icon

This commit is contained in:
Andrew Dolgov 2013-01-14 14:16:55 +04:00
parent eb161344c2
commit 6effae6dd8
5 changed files with 102 additions and 4 deletions

BIN
images/alert.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

87
images/alert.svg Normal file
View File

@ -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>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -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 } ?>

View File

@ -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);
}

View File

@ -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();