10000 [2.8][WebProfilerBundle] Drop dead code by romainneutron · Pull Request #22089 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[2.8][WebProfilerBundle] Drop dead code #22089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ProfilerController
* @param array $templates The templates
* @param string $toolbarPosition The toolbar position (top, bottom, normal, or null -- use the configuration)
*/
public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, \Twig_Environment $twig, array $templates, $toolbarPosition = 'normal')
public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, \Twig_Environment $twig, array $templates, $toolbarPosition = 'bottom')
{
$this->generator = $generator;
$this->profiler = $profiler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
<!-- START of Symfony Web Debug Toolbar -->
{% if 'normal' != position %}
<div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar" data-no-turbolink>
<a href="javascript:void(0);" title="Show Symfony toolbar" tabindex="-1" accesskey="D" onclick="
var elem = this.parentNode;
if (elem.style.display == 'none') {
document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'none';
document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'none';
elem.style.display = 'block';
} else {
document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'block';
document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'block';
elem.style.display = 'none'
}
<div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar" data-no-turbolink>
<a href="javascript:void(0);" title="Show Symfony toolbar" tabindex="-1" accesskey="D" onclick="
var elem = this.parentNode;
if (elem.style.display == 'none') {
document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'none';
document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'none';
elem.style.display = 'block';
} else {
document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'block';
document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'block';
elem.style.display = 'none'
}

Sfjs.setPreference('toolbar/displayState', 'block');
">
{{ include('@WebProfiler/Icon/symfony.svg') }}
</a>
</div>
<style>
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
</style>
<div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 36px;"></div>
{% endif %}
Sfjs.setPreference('toolbar/displayState', 'block');
">
{{ include('@WebProfiler/Icon/symfony.svg') }}
</a>
</div>
<style>
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
</style>
<div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 36px;"></div>

<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset clear-fix" data-no-turbolink>
{% for name, template in templates %}
Expand All @@ -39,16 +37,14 @@
{% endif %}
{% endfor %}

{% if 'normal' != position %}
<a class="hide-button" title="Close Toolbar" tabindex="-1" accesskey="D" onclick="
var p = this.parentNode;
p.style.display = 'none';
(p.previousElementSibling || p.previousSibling).style.display = 'none';
document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
Sfjs.setPreference('toolbar/displayState', 'none');
">
{{ include('@WebProfiler/Icon/close.svg') }}
</a>
{% endif %}
<a class="hide-button" title="Close Toolbar" tabindex="-1" accesskey="D" onclick="
var p = this.parentNode;
p.style.display = 'none';
(p.previousElementSibling || p.previousSibling).style.display = 'none';
document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
Sfjs.setPreference('toolbar/displayState', 'none');
">
{{ include('@WebProfiler/Icon/close.svg') }}
</a>
</div>
<!-- END of Symfony Web Debug Toolbar -->
0