diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-15 08:37:19 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-15 08:37:41 +0400 |
commit | e87c0a9d730e16d099c18e0de1001f5c3f36da93 (patch) | |
tree | ad67154f51af7ed0c998bba6235308c1513e6106 /plugins | |
parent | 3d678f1661b83d797e8830d64f16f4d44dd1052b (diff) |
Remove overlay errorTimeout and display overlay error message on request error.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Overlay/javascripts/Piwik_Overlay.js | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/plugins/Overlay/javascripts/Piwik_Overlay.js b/plugins/Overlay/javascripts/Piwik_Overlay.js index fcb2d8ddee..2d4c8c98ed 100644 --- a/plugins/Overlay/javascripts/Piwik_Overlay.js +++ b/plugins/Overlay/javascripts/Piwik_Overlay.js @@ -12,8 +12,6 @@ var Piwik_Overlay = (function () { var idSite, period, date; - var errorTimeout = false; - var iframeSrcBase; var iframeDomain = ''; var iframeCurrentPage = ''; @@ -75,6 +73,10 @@ var Piwik_Overlay = (function () { } } ); + ajaxRequest.setErrorCallback(function () { + hideLoading(); + $errorNotLoading.show(); + }); ajaxRequest.setFormat('html'); ajaxRequest.send(false); } @@ -97,23 +99,10 @@ var Piwik_Overlay = (function () { $transitionsLink.hide(); $errorNotLoading.hide(); - - // Start a timeout that shows an error when nothing is loaded - if (errorTimeout) { - window.clearTimeout(errorTimeout); - } - errorTimeout = window.setTimeout(function () { - hideLoading(); - $errorNotLoading.show(); - }, 9000); } /** Hide the loading message */ function hideLoading() { - if (errorTimeout) { - window.clearTimeout(errorTimeout); - errorTimeout = false; - } $loading.hide(); $fullScreenLink.show(); } |