File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 3
3
/**
4
4
* Toggle hide/show on the message body
5
5
*/
6
- function httplug_toggleBody ( ) {
6
+ function httplug_toggleBody ( el ) {
7
7
var bodies = document . querySelectorAll ( ".httplug-http-body" ) ;
8
8
9
9
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 ) ;
10
15
}
11
16
12
17
function httplug_togglePluginStack ( el ) {
Original file line number Diff line number Diff line change 20
20
<span >{{ collector .sucessfulRequests }}</span >
21
21
</div >
22
22
<div class =" sf-toolbar-info-piece" >
23
- <b >Faild requests</b >
23
+ <b >Failed requests</b >
24
24
<span >{{ collector .failedRequests }}</span >
25
25
</div >
26
26
30
30
{% endblock %}
31
31
32
32
{% block head %}
33
- {# Optional. Here you can link to or define your own CSS and JS contents. #}
34
33
<link rel =" stylesheet" href =" {{ asset(' bundles/httplug/style/httplug.css' ) }}" />
35
34
<script type =" text/javascript" src =" {{ asset(" bundles/httplug/script/httplug.js" ) }}" ></script >
36
35
{{ parent () }}
52
51
53
52
{% block panel %}
54
53
<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 >
56
55
57
56
<div class =" sf-tabs" >
58
57
{% for name , client in collector .clients %}
You can’t perform that action at this time.
0 commit comments