Merge branch 'issue-1807'
This commit is contained in:
18
dist/swagger-ui.js
vendored
18
dist/swagger-ui.js
vendored
@@ -149,23 +149,24 @@ window.Docs = {
|
|||||||
Docs.expandEndpointListForResource(fragments[0]);
|
Docs.expandEndpointListForResource(fragments[0]);
|
||||||
$("#"+dom_id).slideto({highlight: false});
|
$("#"+dom_id).slideto({highlight: false});
|
||||||
|
|
||||||
// Expand operation
|
// Expand operation
|
||||||
var li_dom_id = fragments.join('_');
|
var li_dom_id = fragments.join('_');
|
||||||
var li_content_dom_id = li_dom_id + "_content";
|
var li_content_dom_id = li_dom_id + "_content";
|
||||||
|
|
||||||
|
|
||||||
Docs.expandOperation($('#'+li_content_dom_id));
|
Docs.expandOperation($('#'+li_content_dom_id));
|
||||||
$('#'+li_dom_id).slideto({highlight: false});
|
$('#'+li_dom_id).slideto({highlight: false});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleEndpointListForResource: function(resource) {
|
toggleEndpointListForResource: function(resource) {
|
||||||
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
||||||
if (elem.is(':visible')) {
|
if (elem.is(':visible')) {
|
||||||
|
$.bbq.pushState('#/', 2);
|
||||||
Docs.collapseEndpointListForResource(resource);
|
Docs.collapseEndpointListForResource(resource);
|
||||||
} else {
|
} else {
|
||||||
|
$.bbq.pushState('#/' + resource, 2);
|
||||||
Docs.expandEndpointListForResource(resource);
|
Docs.expandEndpointListForResource(resource);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -25839,11 +25840,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
toggleOperationContent: function (event) {
|
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);
|
$.bbq.pushState('#/', 2);
|
||||||
|
event.preventDefault();
|
||||||
Docs.collapseOperation(elem);
|
Docs.collapseOperation(elem);
|
||||||
} else {
|
} else {
|
||||||
event.preventDefault();
|
|
||||||
Docs.expandOperation(elem);
|
Docs.expandOperation(elem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
22
dist/swagger-ui.min.js
vendored
22
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -108,23 +108,24 @@ window.Docs = {
|
|||||||
Docs.expandEndpointListForResource(fragments[0]);
|
Docs.expandEndpointListForResource(fragments[0]);
|
||||||
$("#"+dom_id).slideto({highlight: false});
|
$("#"+dom_id).slideto({highlight: false});
|
||||||
|
|
||||||
// Expand operation
|
// Expand operation
|
||||||
var li_dom_id = fragments.join('_');
|
var li_dom_id = fragments.join('_');
|
||||||
var li_content_dom_id = li_dom_id + "_content";
|
var li_content_dom_id = li_dom_id + "_content";
|
||||||
|
|
||||||
|
|
||||||
Docs.expandOperation($('#'+li_content_dom_id));
|
Docs.expandOperation($('#'+li_content_dom_id));
|
||||||
$('#'+li_dom_id).slideto({highlight: false});
|
$('#'+li_dom_id).slideto({highlight: false});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleEndpointListForResource: function(resource) {
|
toggleEndpointListForResource: function(resource) {
|
||||||
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
|
||||||
if (elem.is(':visible')) {
|
if (elem.is(':visible')) {
|
||||||
|
$.bbq.pushState('#/', 2);
|
||||||
Docs.collapseEndpointListForResource(resource);
|
Docs.collapseEndpointListForResource(resource);
|
||||||
} else {
|
} else {
|
||||||
|
$.bbq.pushState('#/' + resource, 2);
|
||||||
Docs.expandEndpointListForResource(resource);
|
Docs.expandEndpointListForResource(resource);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -678,11 +678,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
toggleOperationContent: function (event) {
|
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);
|
$.bbq.pushState('#/', 2);
|
||||||
|
event.preventDefault();
|
||||||
Docs.collapseOperation(elem);
|
Docs.collapseOperation(elem);
|
||||||
} else {
|
} else {
|
||||||
event.preventDefault();
|
|
||||||
Docs.expandOperation(elem);
|
Docs.expandOperation(elem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user