fixed display of OAuth scheme in dialog if more than one scheme

This commit is contained in:
Tom Demeranville
2015-12-18 16:21:01 +00:00
parent bfc33ec6cd
commit 3f9b178ce1

View File

@@ -65,10 +65,10 @@ function handleLogin() {
scope = scopes[i]; scope = scopes[i];
str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"' +'" oauthtype="' + scope.OAuthSchemeKey +'"/>' + '<label for="scope_' + i + '">' + scope.scope ; str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"' +'" oauthtype="' + scope.OAuthSchemeKey +'"/>' + '<label for="scope_' + i + '">' + scope.scope ;
if (scope.description) { if (scope.description) {
if (auths.length > 1) if ($.map(auths, function(n, i) { return i; }).length > 1) //if we have more than one scheme, display schemes
str += '<br/><span class="api-scope-desc">' + scope.description + ' ('+ scope.OAuthSchemeKey+')' +'</span>'; str += '<br/><span class="api-scope-desc">' + scope.description + ' ('+ scope.OAuthSchemeKey+')' +'</span>';
else else
str += '<br/><span class="api-scope-desc">' + scope.description + '</span>'; str += '<br/><span class="api-scope-desc">' + scope.description + '</span>';
} }
str += '</label></li>'; str += '</label></li>';
popup.append(str); popup.append(str);