diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-25 08:12:32 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-25 08:12:32 +0400 |
commit | 6c82534230eba6025b0c330b04493a2fdfe45f9e (patch) | |
tree | c97161c303612bf4e763a56e4a9370ad87216afe /plugins/CoreHome | |
parent | 2dd4d251b8d1b7d82f3dfa1b6010c9f26b1ab8b6 (diff) |
In broadcast.js ajax page load, if response is an HTML page with a Piwik error, display the error instead of doing nothing.
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r-- | plugins/CoreHome/javascripts/broadcast.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index 8ba28bb609..7a38a63df6 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -408,7 +408,12 @@ var broadcast = { // if content is whole HTML document, do not show it, otherwise recursive page load could occur var htmlDocType = '<!DOCTYPE'; if (content.substring(0, htmlDocType.length) == htmlDocType) { - return; + // if the content has an error message, display it + if ($(content).filter('title').text() == 'Piwik › Error') { + content = $(content).filter('#contentsimple'); + } else { + return; + } } if (urlAjax == broadcast.lastUrlRequested) { |