merged branch ruimarinho/profiler_ie7 (PR #4032)
Commits
-------
ffc074b
[Profiler] Fixed IE7 JavaScript errors
Discussion
----------
[Profiler] Fixed IE7 JavaScript errors
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Requires merge of another [PR](https://github.com/doctrine/DoctrineBundle/pull/61) available on the `doctrine/DoctrineBundle` repository (compatibility changes to `db.html.twig`).
---------------------------------------------------------------------------
by fabpot at 2012-04-20T14:15:22Z
That does not work for me.
This commit is contained in:
commit
6c714095fa
@ -33,7 +33,8 @@
|
||||
addClass: addClass,
|
||||
request: request,
|
||||
load: function(selector, url, onSuccess, onError, options) {
|
||||
var el = document.querySelector(selector);
|
||||
var el = document.getElementById(selector);
|
||||
|
||||
if (el && el.getAttribute('data-sfurl') !== url) {
|
||||
request(
|
||||
url,
|
||||
@ -54,16 +55,13 @@
|
||||
var i,
|
||||
style,
|
||||
tmp = elOn.style.display,
|
||||
els = document.querySelectorAll(selector);
|
||||
el = document.getElementById(selector);
|
||||
|
||||
elOn.style.display = elOff.style.display;
|
||||
elOff.style.display = tmp;
|
||||
|
||||
if (els.length) {
|
||||
style = 'none' === tmp ? 'none' : 'block';
|
||||
for (i = els.length - 1; i >= 0; --i) {
|
||||
els[i].style.display = style;
|
||||
}
|
||||
if (el) {
|
||||
el.style.display = 'none' === tmp ? 'none' : 'block';
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -3,7 +3,7 @@
|
||||
<script type="text/javascript">/*<![CDATA[*/
|
||||
(function () {
|
||||
Sfjs.load(
|
||||
'#sfwdt{{ token }}',
|
||||
'sfwdt{{ token }}',
|
||||
'{{ path("_wdt", { "token": token }) }}',
|
||||
function(xhr, el) {
|
||||
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
|
||||
|
Reference in New Issue
Block a user