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,
|
addClass: addClass,
|
||||||
request: request,
|
request: request,
|
||||||
load: function(selector, url, onSuccess, onError, options) {
|
load: function(selector, url, onSuccess, onError, options) {
|
||||||
var el = document.querySelector(selector);
|
var el = document.getElementById(selector);
|
||||||
|
|
||||||
if (el && el.getAttribute('data-sfurl') !== url) {
|
if (el && el.getAttribute('data-sfurl') !== url) {
|
||||||
request(
|
request(
|
||||||
url,
|
url,
|
||||||
@ -54,16 +55,13 @@
|
|||||||
var i,
|
var i,
|
||||||
style,
|
style,
|
||||||
tmp = elOn.style.display,
|
tmp = elOn.style.display,
|
||||||
els = document.querySelectorAll(selector);
|
el = document.getElementById(selector);
|
||||||
|
|
||||||
elOn.style.display = elOff.style.display;
|
elOn.style.display = elOff.style.display;
|
||||||
elOff.style.display = tmp;
|
elOff.style.display = tmp;
|
||||||
|
|
||||||
if (els.length) {
|
if (el) {
|
||||||
style = 'none' === tmp ? 'none' : 'block';
|
el.style.display = 'none' === tmp ? 'none' : 'block';
|
||||||
for (i = els.length - 1; i >= 0; --i) {
|
|
||||||
els[i].style.display = style;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<script type="text/javascript">/*<![CDATA[*/
|
<script type="text/javascript">/*<![CDATA[*/
|
||||||
(function () {
|
(function () {
|
||||||
Sfjs.load(
|
Sfjs.load(
|
||||||
'#sfwdt{{ token }}',
|
'sfwdt{{ token }}',
|
||||||
'{{ path("_wdt", { "token": token }) }}',
|
'{{ path("_wdt", { "token": token }) }}',
|
||||||
function(xhr, el) {
|
function(xhr, el) {
|
||||||
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
|
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
|
||||||
|
Reference in New Issue
Block a user