diff options
author | Andrew Dolgov <[email protected]> | 2013-01-14 14:16:55 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-01-14 14:16:55 +0400 |
commit | 6effae6dd8709230b91c3bed10d4eae476ef2f48 (patch) | |
tree | d0505af422f8ca45e210e011d289e784f57be973 /js | |
parent | eb161344c2dd4ccd2abbdfbf96e27c91636b10a1 (diff) |
add net-alert icon
Diffstat (limited to 'js')
-rw-r--r-- | js/tt-rss.js | 8 | ||||
-rw-r--r-- | js/viewfeed.js | 7 |
2 files changed, 11 insertions, 4 deletions
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(); |