Remove all references to swaggerUi global instance
This commit is contained in:
@@ -7,7 +7,10 @@ SwaggerUi.Views.ApiKeyButton = Backbone.View.extend({ // TODO: append this to gl
|
||||
'click #apply_api_key' : 'applyApiKey'
|
||||
},
|
||||
|
||||
initialize: function(){},
|
||||
initialize: function(opts){
|
||||
this.options = opts || {};
|
||||
this.router = this.options.router;
|
||||
},
|
||||
|
||||
render: function(){
|
||||
var template = this.template();
|
||||
@@ -23,13 +26,13 @@ SwaggerUi.Views.ApiKeyButton = Backbone.View.extend({ // TODO: append this to gl
|
||||
$('#input_apiKey_entry').val(),
|
||||
this.model.in
|
||||
);
|
||||
window.authorizations.add(this.model.name, keyAuth);
|
||||
window.swaggerUi.load();
|
||||
this.router.api.clientAuthorizations.add(this.model.name, keyAuth);
|
||||
this.router.load();
|
||||
$('#apikey_container').show();
|
||||
},
|
||||
|
||||
toggleApiKeyContainer: function(){
|
||||
if ($('#apikey_container').length > 0) {
|
||||
if ($('#apikey_container').length) {
|
||||
|
||||
var elem = $('#apikey_container').first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user