make redirect_uri global

This commit is contained in:
Sebastian Wahn
2016-05-25 17:30:58 +02:00
parent 56a62d9f84
commit 2ec76378cd
4 changed files with 49 additions and 46 deletions

View File

@@ -7,7 +7,7 @@
* after <script src='lang/translator.js' type='text/javascript'></script>. * after <script src='lang/translator.js' type='text/javascript'></script>.
* For example - <script src='lang/ru.js' type='text/javascript'></script> * For example - <script src='lang/ru.js' type='text/javascript'></script>
* *
* If you wish to translate some new texsts you should do two things: * If you wish to translate some new texts you should do two things:
* 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.
* 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>. * 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>.
* The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.

57
dist/swagger-ui.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
'use strict'; 'use strict';
/* global redirect_uri */ /* global redirect_uri:true */
/* global clientId */ /* global clientId */
/* global scopeSeparator */ /* global scopeSeparator */
/* global additionalQueryStringParams */ /* global additionalQueryStringParams */
@@ -140,7 +140,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
} }
} }
var redirect_uri = redirectUrl; redirect_uri = redirectUrl;
url += '&redirect_uri=' + encodeURIComponent(redirectUrl); url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
url += '&realm=' + encodeURIComponent(realm); url += '&realm=' + encodeURIComponent(realm);