merged branch alexandresalome/toolbar-js-error (PR #2205)
Commits -------c6b15b3
[WebProfilerBundle] Variables only used once847c665
[WebProfilerBundle] Use panel URL for debugging toolbarfe13a6c
[WebProfilerBundle] Fix CSfe76d74
[WebProfilerBundle] Propose to open debug toolbar request in an error occured. Discussion ---------- [WebProfilerBundle] Propose to open debug toolbar request in an error occ [WebProfilerBundle] Propose to open debug toolbar request in an error occured. This is very useful when creating data collectors and an error occurs when redering the toolbar via XHR. The only problem is that the exception page renders the toolbar via JS, too. --------------------------------------------------------------------------- by stof at 2011/09/17 05:26:10 -0700 IMO, you should propose to open the link to the profiler (if the profiler is enabled) instead of opening the toolbar alone --------------------------------------------------------------------------- by alexandresalome at 2011/09/17 05:34:50 -0700 Thanks @stof --------------------------------------------------------------------------- by alexandresalome at 2011/09/17 05:50:11 -0700 4 commits for 2 lines... I should change my job. Thanks @stof, again
This commit is contained in:
commit
b8303f3995
@ -14,6 +14,8 @@
|
|||||||
if (4 === xhr.readyState && 200 === xhr.status && -1 !== xhr.responseText.indexOf('sf-toolbarreset')) {
|
if (4 === xhr.readyState && 200 === xhr.status && -1 !== xhr.responseText.indexOf('sf-toolbarreset')) {
|
||||||
wdt.innerHTML = xhr.responseText;
|
wdt.innerHTML = xhr.responseText;
|
||||||
wdt.style.display = 'block';
|
wdt.style.display = 'block';
|
||||||
|
} else if (4 === xhr.readyState && xhr.status != 200) {
|
||||||
|
confirm('An error occured while loading the debug toolbar ('+xhr.status+': '+xhr.statusText+') .\n\nDo you want to open the page ?') && (window.location = '{{ path("_profiler", { "token": token }) }}');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.send('');
|
xhr.send('');
|
||||||
|
Reference in New Issue
Block a user