diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js
index c58c2b79..f1c72d79 100644
--- a/dist/swagger-ui.js
+++ b/dist/swagger-ui.js
@@ -141,6 +141,11 @@ var Docs = {
// Collapse resource and mark as explicitly closed
collapseEndpointListForResource: function(resource) {
var resource = Docs.escapeResourceName(resource);
+ if (resource == '') {
+ $('.resource ul.endpoints').slideUp();
+ return;
+ }
+
$('li#resource_' + resource).removeClass('active');
var elem = $('li#resource_' + resource + ' ul.endpoints');
@@ -165,6 +170,11 @@ var Docs = {
// Make sure the resource container is open..
Docs.expandEndpointListForResource(resource);
+ if (resource == '') {
+ $('.resource ul.endpoints li.operation div.content').slideUp();
+ return;
+ }
+
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
Docs.collapseOperation($(this));
});
@@ -181,7 +191,8 @@ var Docs = {
collapseOperation: function(elem) {
elem.slideUp();
}
-};
+};
+
var SwaggerUi,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
@@ -389,27 +400,6 @@ Handlebars.registerHelper('sanitize', function(html) {
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
return "
"
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
@@ -546,59 +613,32 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
if (stack1 != null) { buffer += stack1; }
return buffer + " \n
\n\n";
},"useData":true});
-var BasicAuthButton,
+var ContentTypeView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
-BasicAuthButton = (function(_super) {
- __extends(BasicAuthButton, _super);
+ContentTypeView = (function(_super) {
+ __extends(ContentTypeView, _super);
- function BasicAuthButton() {
- return BasicAuthButton.__super__.constructor.apply(this, arguments);
+ function ContentTypeView() {
+ return ContentTypeView.__super__.constructor.apply(this, arguments);
}
- BasicAuthButton.prototype.initialize = function() {};
+ ContentTypeView.prototype.initialize = function() {};
- BasicAuthButton.prototype.render = function() {
+ ContentTypeView.prototype.render = function() {
var template;
template = this.template();
$(this.el).html(template(this.model));
+ $('label[for=contentType]', $(this.el)).text('Response Content Type');
return this;
};
- BasicAuthButton.prototype.events = {
- "click #basic_auth_button": "togglePasswordContainer",
- "click #apply_basic_auth": "applyPassword"
+ ContentTypeView.prototype.template = function() {
+ return Handlebars.templates.content_type;
};
- BasicAuthButton.prototype.applyPassword = function() {
- var elem, password, username;
- console.log("applying password");
- username = $(".input_username").val();
- password = $(".input_password").val();
- window.authorizations.add(this.model.type, new PasswordAuthorization("basic", username, password));
- window.swaggerUi.load();
- return elem = $('#basic_auth_container').hide();
- };
-
- BasicAuthButton.prototype.togglePasswordContainer = function() {
- var elem;
- if ($('#basic_auth_container').length > 0) {
- elem = $('#basic_auth_container').show();
- if (elem.is(':visible')) {
- return elem.slideUp();
- } else {
- $('.auth_container').hide();
- return elem.show();
- }
- }
- };
-
- BasicAuthButton.prototype.template = function() {
- return Handlebars.templates.basic_auth_button_view;
- };
-
- return BasicAuthButton;
+ return ContentTypeView;
})(Backbone.View);
@@ -702,32 +742,68 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
if (stack1 != null) { buffer += stack1; }
return buffer + " \n