Skip to content

Commit fb08dab

Browse files
committed
Minor
1 parent 458fc4f commit fb08dab

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Resources/public/script/httplug.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
/**
44
* Toggle hide/show on the message body
55
*/
6-
function httplug_toggleBody() {
6+
function httplug_toggleBody(el) {
77
var bodies = document.querySelectorAll(".httplug-http-body");
88

99
httplug_toggleVisibility(bodies);
10+
11+
var newLabel = el.getAttribute("data-label");
12+
var oldLabel = el.innerHTML;
13+
el.innerHTML = newLabel;
14+
el.setAttribute("data-label", oldLabel);
1015
}
1116

1217
function httplug_togglePluginStack(el) {

Resources/views/webprofiler.html.twig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<span>{{ collector.sucessfulRequests }}</span>
2121
</div>
2222
<div class="sf-toolbar-info-piece">
23-
<b>Faild requests</b>
23+
<b>Failed requests</b>
2424
<span>{{ collector.failedRequests }}</span>
2525
</div>
2626

@@ -30,7 +30,6 @@
3030
{% endblock %}
3131

3232
{% block head %}
33-
{# Optional. Here you can link to or define your own CSS and JS contents. #}
3433
<link rel="stylesheet" href="{{ asset('bundles/httplug/style/httplug.css') }}" />
3534
<script type="text/javascript" src="{{ asset("bundles/httplug/script/httplug.js") }}"></script>
3635
{{ parent() }}
@@ -52,7 +51,7 @@
5251

5352
{% block panel %}
5453
<h2>HTTPlug</h2>
55-
<button class="btn push-right" onclick="httplug_toggleBody()">Toggle message body</button>
54+
<button class="btn push-right" onclick="httplug_toggleBody(this)" data-label="Hide message body">Show message body</button>
5655

5756
<div class="sf-tabs">
5857
{% for name, client in collector.clients %}

0 commit comments

Comments
 (0)