'use strict'; SwaggerUi.Views.AuthView = Backbone.View.extend({ events: { 'click .authorize__btn': 'authorizeBtnClick' }, tpls: { popup: Handlebars.templates.popup, authBtn: Handlebars.templates.auth_button }, initialize: function(){}, render: function () { this.$el.html(this.tpls.authBtn()); return this; }, authorizeBtnClick: function (e) { var authsModel; e.preventDefault(); authsModel = {title: 'Please authorize', content: this.renderAuths()}; this.popup = new SwaggerUi.Views.PopupView({model: authsModel}); this.popup.render(); }, renderAuths: function () { var name, authEl; var el = $('