mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Moved response headers above response body with a click to expand/shrink
This commit is contained in:
parent
d5ab75fd9e
commit
5b78bee151
@ -1153,6 +1153,16 @@ body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operatio
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.result pre.to-shrink,
|
||||
.result pre.to-expand {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.result pre.to-expand {
|
||||
height: 1em;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.tabs li {
|
||||
display: inline;
|
||||
float: left;
|
||||
|
@ -198,6 +198,23 @@
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('.pane.sandbox').delegate('.to-expand, .to-shrink', 'click', function(e) {
|
||||
var $headers = $(this).parents('.result').find('.headers');
|
||||
var $label = $(this).parents('.result').find('a.to-expand');
|
||||
|
||||
if ($headers.hasClass('to-expand')) {
|
||||
$headers.removeClass('to-expand');
|
||||
$headers.addClass('to-shrink');
|
||||
$label.text('Shrink');
|
||||
} else {
|
||||
$headers.removeClass('to-shrink');
|
||||
$headers.addClass('to-expand');
|
||||
$label.text('Expand');
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('.pane.sandbox').on('click', '.add', function() {
|
||||
var html = $(this).parents('.pane').find('.tuple_template').html();
|
||||
|
||||
|
@ -145,11 +145,11 @@
|
||||
<h4>Request URL</h4>
|
||||
<pre class="url"></pre>
|
||||
|
||||
<h4>Response Headers <small>[<a href="" class="to-expand">Expand</a>]</small></h4>
|
||||
<pre class="headers to-expand"></pre>
|
||||
|
||||
<h4>Response Body <small>[<a href="" class="to-raw">Raw</a>]</small></h4>
|
||||
<pre class="response prettyprint"></pre>
|
||||
|
||||
<h4>Response Headers</h4>
|
||||
<pre class="headers"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user