[auth] moved logic for auths collections into AuthsCollection

This commit is contained in:
bodnia
2016-03-09 03:18:26 +02:00
parent e7d5ad6d2e
commit c3d4bcca3d
10 changed files with 175 additions and 53 deletions

View File

@@ -8,12 +8,15 @@ SwaggerUi.Views.Oauth2View = Backbone.View.extend({
template: Handlebars.templates.oauth2,
render: function () {
$(this.el).html(this.template(this.model.toJSON()));
this.$el.html(this.template(this.model.toJSON()));
return this;
},
scopeChange: function () {
scopeChange: function (e) {
var val = $(e.target).prop('checked');
var scope = $(e.target).data('scope');
this.model.setScopes(scope, val);
}
});