Merge branch 'swaggerlikeus' of ssh://bitbucket.org/yackob03/quay into swaggerlikeus

This commit is contained in:
jakedt 2014-03-18 19:21:53 -04:00
commit 19c7453f99
4 changed files with 26 additions and 10 deletions

View file

@ -63,11 +63,12 @@ def get_scope_information(scopes_string):
scopes = scopes_from_scope_string(scopes_string)
scope_info = []
for scope in scopes:
scope_info.append({
'title': ALL_SCOPES[scope]['title'],
'scope': ALL_SCOPES[scope]['scope'],
'description': ALL_SCOPES[scope]['description'],
'icon': ALL_SCOPES[scope]['icon'],
})
if scope:
scope_info.append({
'title': ALL_SCOPES[scope]['title'],
'scope': ALL_SCOPES[scope]['scope'],
'description': ALL_SCOPES[scope]['description'],
'icon': ALL_SCOPES[scope]['icon'],
})
return scope_info

View file

@ -278,6 +278,9 @@ def request_authorization_code():
# Load the scope information.
scope_info = scopes.get_scope_information(scope)
if not scope_info:
abort(404)
return
# Load the application information.
oauth_app = provider.get_application_for_client_id(client_id)

View file

@ -3451,8 +3451,8 @@ pre.command:before {
display: inline-block;
}
.auth-scopes .scope .title:hover {
color: #428bca;
.auth-scopes .scope .title a {
color: #444;
}
.auth-scopes .scope .description {
@ -3462,9 +3462,20 @@ pre.command:before {
.auth-scopes .scope i {
margin-right: 10px;
margin-top: 2px;
}
.auth-scopes .scope i.fa-lg {
font-size: 24px;
}
.auth-scopes .title i.arrow:before {
content: "\f0d7";
}
.auth-scopes .title.collapsed i.arrow:before {
content: "\f0da" !important;
}
.auth-container .button-bar {
margin-top: 10px;
padding-top: 10px;

View file

@ -22,8 +22,9 @@
<div class="panel-heading">
<h4 class="panel-title">
<div class="title-container">
<i class="fa {{ scope.icon }} fa-lg"></i>
<div class="title" data-toggle="collapse" data-parent="#scopeGroup" data-target="#description-{{ index }}">
<div class="title collapsed" data-toggle="collapse" data-parent="#scopeGroup" data-target="#description-{{ index }}">
<i class="fa arrow"></i>
<i class="fa {{ scope.icon }} fa-lg"></i>
<a data-toggle="collapse" href="#collapseOne">
{{ scope.title }}
</a>