fixes #958
This commit is contained in:
853
dist/swagger-ui.js
vendored
853
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
17
dist/swagger-ui.min.js
vendored
17
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -93,11 +93,13 @@ window.Docs = {
|
|||||||
|
|
||||||
switch (fragments.length) {
|
switch (fragments.length) {
|
||||||
case 1:
|
case 1:
|
||||||
// Expand all operations for the resource and scroll to it
|
if (fragments[0].length > 0) { // prevent matching "#/"
|
||||||
var dom_id = 'resource_' + fragments[0];
|
// Expand all operations for the resource and scroll to it
|
||||||
|
var dom_id = 'resource_' + fragments[0];
|
||||||
|
|
||||||
Docs.expandEndpointListForResource(fragments[0]);
|
Docs.expandEndpointListForResource(fragments[0]);
|
||||||
$("#"+dom_id).slideto({highlight: false});
|
$("#"+dom_id).slideto({highlight: false});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Refer to the endpoint DOM element, e.g. #words_get_search
|
// Refer to the endpoint DOM element, e.g. #words_get_search
|
||||||
|
|||||||
@@ -680,9 +680,11 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleOperationContent: function() {
|
toggleOperationContent: function (event) {
|
||||||
var elem = $('#' + Docs.escapeResourceName(this.parentId + '_' + this.nickname + '_content'));
|
var elem = $('#' + Docs.escapeResourceName(this.parentId + '_' + this.nickname + '_content'));
|
||||||
if (elem.is(':visible')){
|
if (elem.is(':visible')){
|
||||||
|
event.preventDefault();
|
||||||
|
$.bbq.pushState('#/', 2);
|
||||||
Docs.collapseOperation(elem);
|
Docs.collapseOperation(elem);
|
||||||
} else {
|
} else {
|
||||||
Docs.expandOperation(elem);
|
Docs.expandOperation(elem);
|
||||||
|
|||||||
Reference in New Issue
Block a user