diff --git a/dist/css/print.css b/dist/css/print.css
index f0d90689..8d6b9e29 100644
--- a/dist/css/print.css
+++ b/dist/css/print.css
@@ -1181,6 +1181,9 @@
.swagger-section .oauth_submit {
text-align: center;
}
+.swagger-section .authorize-wrapper {
+ margin: 15px 0 10px;
+}
.swagger-section .authorize__btn:hover {
text-decoration: underline;
cursor: pointer;
@@ -1203,7 +1206,7 @@
cursor: pointer;
}
.swagger-section .auth_container .key_input_container {
- margin-bottom: 10px;
+ margin-bottom: 15px;
}
.swagger-section .auth_container .basic_auth_container {
font-size: 0.9em;
@@ -1232,6 +1235,10 @@
padding-left: 5px;
padding-bottom: 5px;
}
+.swagger-section .api-popup-dialog .api-popup-content {
+ max-height: 500px;
+ overflow-y: auto;
+}
.swagger-section .api-popup-dialog .api-popup-authbtn {
height: 30px;
}
diff --git a/dist/css/screen.css b/dist/css/screen.css
index 3235151e..85c26738 100644
--- a/dist/css/screen.css
+++ b/dist/css/screen.css
@@ -1181,6 +1181,9 @@
.swagger-section .oauth_submit {
text-align: center;
}
+.swagger-section .authorize-wrapper {
+ margin: 15px 0 10px;
+}
.swagger-section .authorize__btn:hover {
text-decoration: underline;
cursor: pointer;
@@ -1203,7 +1206,7 @@
cursor: pointer;
}
.swagger-section .auth_container .key_input_container {
- margin-bottom: 10px;
+ margin-bottom: 15px;
}
.swagger-section .auth_container .basic_auth_container {
font-size: 0.9em;
@@ -1232,6 +1235,10 @@
padding-left: 5px;
padding-bottom: 5px;
}
+.swagger-section .api-popup-dialog .api-popup-content {
+ max-height: 500px;
+ overflow-y: auto;
+}
.swagger-section .api-popup-dialog .api-popup-authbtn {
height: 30px;
}
diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js
index 02336054..74cbfada 100644
--- a/dist/swagger-ui.js
+++ b/dist/swagger-ui.js
@@ -8,12 +8,16 @@
this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
- return "
\n";
+ return "\n";
},"useData":true});
this["Handlebars"]["templates"]["auth_button"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- return "Authorize\n";
+ return "Click to Authorize\n";
},"useData":true});
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
@@ -850,12 +854,10 @@ this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template(
return buffer + "\n";
},"useData":true});
this["Handlebars"]["templates"]["popup"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "";
},"useData":true});
this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
return " : ";
@@ -25056,7 +25058,6 @@ SwaggerUi.Views.ApiKeyButton = Backbone.View.extend({ // TODO: append this to gl
);
this.router.api.clientAuthorizations.add(this.model.name, keyAuth);
this.router.load();
- //$('#apikey_container').show();
}
});
@@ -25072,7 +25073,10 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
authBtn: Handlebars.templates.auth_button
},
- initialize: function(){},
+ initialize: function(opts) {
+ this.options = opts || {};
+ this.router = this.options.router;
+ },
render: function () {
this.$el.html(this.tpls.authBtn());
@@ -25084,7 +25088,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
var authsModel;
e.preventDefault();
- authsModel = {title: 'Please authorize', content: this.renderAuths()};
+ authsModel = {title: 'Available authorizations', content: this.renderAuths()};
this.popup = new SwaggerUi.Views.PopupView({model: authsModel});
this.popup.render();
@@ -25109,7 +25113,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
}
}
- return el.html();
+ return el;
}
});
@@ -25295,7 +25299,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
this.model.securityDefinitions = this.model.securityDefinitions || {};
if (this.model.securityDefinitions) {
- this.authView = new SwaggerUi.Views.AuthView({model: this.model.securityDefinitions});
+ this.authView = new SwaggerUi.Views.AuthView({model: this.model.securityDefinitions, router: this.router});
this.$('.authorize-wrapper').append(this.authView.render().el);
}
@@ -27353,6 +27357,11 @@ SwaggerUi.Views.PopupView = Backbone.View.extend({
template: Handlebars.templates.popup,
className: 'api-popup-dialog',
+ selectors: {
+ content: '.api-popup-content',
+ main : '#swagger-ui-container'
+ },
+
initialize: function(){},
render: function () {
@@ -27362,7 +27371,8 @@ SwaggerUi.Views.PopupView = Backbone.View.extend({
dh = $win.height();
st = $win.scrollTop();
this.$el.html(this.template(this.model));
- $(document.body).append(this.el);
+ this.$(this.selectors.content).append(this.model.content);
+ $(this.selectors.main).first().append(this.el);
dlgWd = this.$el.outerWidth();
dlgHt = this.$el.outerHeight();
top = (dh -dlgHt)/2 + st;
diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js
index fc5c5695..d29e83cb 100644
--- a/dist/swagger-ui.min.js
+++ b/dist/swagger-ui.min.js
@@ -1,11 +1,11 @@
-(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",s=t.helperMissing,o=this.escapeExpression;return"\n"},useData:!0}),this.Handlebars.templates.auth_button=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return"Authorize\n"},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",s=t.helperMissing,o=this.escapeExpression;return'\n
Basic authentication
\n
\n
\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i=this.lambda,a=this.escapeExpression;return' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,s="function",o=t.helperMissing,u=this.escapeExpression,l='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),r=n+"_content";Docs.expandOperation($("#"+r)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?($.bbq.pushState("#/",2),Docs.collapseEndpointListForResource(e)):($.bbq.pushState("#/"+e,2),Docs.expandEndpointListForResource(e))},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/