Remove global views

Append all views to SwaggerUi.Views object
This commit is contained in:
Mohsen Azimi
2015-03-12 16:42:23 -07:00
parent 8440833f6c
commit dac83b71c8
16 changed files with 56 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
'use strict';
var OperationView = Backbone.View.extend({
SwaggerUi.Views.OperationView = Backbone.View.extend({
invocationUrl: null,
events: {
@@ -163,7 +163,7 @@ var OperationView = Backbone.View.extend({
}
$(this.el).html(Handlebars.templates.operation(this.model));
if (signatureModel) {
responseSignatureView = new SignatureView({
responseSignatureView = new SwaggerUi.Views.SignatureView({
model: signatureModel,
tagName: 'div'
});
@@ -199,7 +199,7 @@ var OperationView = Backbone.View.extend({
}
param.type = type;
}
responseContentTypeView = new ResponseContentTypeView({
responseContentTypeView = new SwaggerUi.Views.ResponseContentTypeView({
model: contentTypeModel
});
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
@@ -219,7 +219,7 @@ var OperationView = Backbone.View.extend({
addParameter: function(param, consumes) {
// Render a parameter
param.consumes = consumes;
var paramView = new ParameterView({
var paramView = new SwaggerUi.Views.ParameterView({
model: param,
tagName: 'tr',
readOnly: this.model.isReadOnly