[auth] UI changes

This commit is contained in:
bodnia
2016-03-13 00:52:47 +02:00
parent 1e38c8999b
commit 0f77177455
21 changed files with 413 additions and 131 deletions

View File

@@ -0,0 +1,21 @@
'use strict';
SwaggerUi.Models.BasicAuthModel = Backbone.Model.extend({
defaults: {
username: '',
password: '',
title: 'basic'
},
initialize: function () {
this.on('change', this.validate);
},
validate: function () {
var valid = !!this.get('password') && !!this.get('username');
this.set('valid', valid);
return valid;
}
});