merged branch craue/patch-22 (PR #4395)

Commits
-------

d11af63 avoid showing the web profiler toolbar loading error if status is 0

Discussion
----------

[WebProfilerBundle] avoid showing the web profiler toolbar loading error if status is 0

Currently, such error is also shown if loading the page is manually aborted, e.g. by clicking on a link before the toolbar has been loaded, which is quite annoying.

---------------------------------------------------------------------------

by travisbot at 2012-05-24T14:42:43Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1422610) (merged d11af636 into b07fb3c4).
This commit is contained in:
Fabien Potencier 2012-05-24 16:46:49 +02:00
commit e2c36c544d

View File

@ -9,7 +9,9 @@
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
},
function(xhr) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}')
if (xhr.status !== 0) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}');
}
}
);
})();