merged to develop_2.0
This commit is contained in:
@@ -240,7 +240,7 @@ window.onOAuthComplete = function onOAuthComplete(token) {
|
|||||||
if(b){
|
if(b){
|
||||||
// if all roles are satisfied
|
// if all roles are satisfied
|
||||||
var o = null;
|
var o = null;
|
||||||
$.each($('.auth #api_information_panel'), function(k, v) {
|
$.each($('.auth .api-ic .api_information_panel'), function(k, v) {
|
||||||
var children = v;
|
var children = v;
|
||||||
if(children && children.childNodes) {
|
if(children && children.childNodes) {
|
||||||
var requiredScopes = [];
|
var requiredScopes = [];
|
||||||
@@ -257,7 +257,7 @@ window.onOAuthComplete = function onOAuthComplete(token) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(diff.length > 0){
|
if(diff.length > 0){
|
||||||
o = v.parentNode;
|
o = v.parentNode.parentNode;
|
||||||
$(o.parentNode).find('.api-ic.ic-on').addClass('ic-off');
|
$(o.parentNode).find('.api-ic.ic-on').addClass('ic-off');
|
||||||
$(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on');
|
$(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on');
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ window.onOAuthComplete = function onOAuthComplete(token) {
|
|||||||
$(o).find('.api-ic').removeClass('ic-error');
|
$(o).find('.api-ic').removeClass('ic-error');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
o = v.parentNode;
|
o = v.parentNode.parentNode;
|
||||||
$(o.parentNode).find('.api-ic.ic-off').addClass('ic-on');
|
$(o.parentNode).find('.api-ic.ic-off').addClass('ic-on');
|
||||||
$(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off');
|
$(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off');
|
||||||
|
|
||||||
|
|||||||
@@ -1155,8 +1155,16 @@
|
|||||||
.swagger-section .auth {
|
.swagger-section .auth {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.swagger-section #api_information_panel {
|
.swagger-section .api-ic {
|
||||||
position: absolute;
|
height: 18px;
|
||||||
|
vertical-align: middle;
|
||||||
|
display: inline-block;
|
||||||
|
background: url(../images/explorer_icons.png) no-repeat;
|
||||||
|
}
|
||||||
|
.swagger-section .api-ic .api_information_panel {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: -5px;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@@ -1167,34 +1175,32 @@
|
|||||||
color: black;
|
color: black;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
.swagger-section #api_information_panel p .api-msg-enabled {
|
.swagger-section .api-ic .api_information_panel p .api-msg-enabled {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
.swagger-section #api_information_panel p .api-msg-disabled {
|
.swagger-section .api-ic .api_information_panel p .api-msg-disabled {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
.swagger-section .api-ic {
|
.swagger-section .api-ic:hover .api_information_panel {
|
||||||
height: 18px;
|
position: absolute;
|
||||||
vertical-align: middle;
|
display: block;
|
||||||
display: inline-block;
|
|
||||||
background: url(../images/explorer_icons.png) no-repeat;
|
|
||||||
}
|
}
|
||||||
.swagger-section .ic-info {
|
.swagger-section .ic-info {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
margin-top: -7px;
|
margin-top: -6px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.swagger-section .ic-warning {
|
.swagger-section .ic-warning {
|
||||||
background-position: -60px 0;
|
background-position: -60px 0;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
margin-top: -7px;
|
margin-top: -6px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.swagger-section .ic-error {
|
.swagger-section .ic-error {
|
||||||
background-position: -30px 0;
|
background-position: -30px 0;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
margin-top: -7px;
|
margin-top: -6px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.swagger-section .ic-off {
|
.swagger-section .ic-off {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
'click .response_hider' : 'hideResponse',
|
'click .response_hider' : 'hideResponse',
|
||||||
'click .toggleOperation' : 'toggleOperationContent',
|
'click .toggleOperation' : 'toggleOperationContent',
|
||||||
'mouseenter .api-ic' : 'mouseEnter',
|
'mouseenter .api-ic' : 'mouseEnter',
|
||||||
'mouseout .api-ic' : 'mouseExit',
|
|
||||||
'dblclick .curl' : 'selectText',
|
'dblclick .curl' : 'selectText',
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -72,11 +71,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
pos.top = y;
|
pos.top = y;
|
||||||
pos.left = x;
|
pos.left = x;
|
||||||
elem.css(pos);
|
elem.css(pos);
|
||||||
$(e.currentTarget.parentNode).find('#api_information_panel').show();
|
|
||||||
},
|
|
||||||
|
|
||||||
mouseExit: function(e) {
|
|
||||||
$(e.currentTarget.parentNode).find('#api_information_panel').hide();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Note: copied from CoffeeScript compiled file
|
// Note: copied from CoffeeScript compiled file
|
||||||
|
|||||||
@@ -12,50 +12,58 @@
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
#api_information_panel {
|
|
||||||
position: absolute;
|
|
||||||
background: #FFF;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 5px;
|
|
||||||
display: none;
|
|
||||||
font-size: 13px;
|
|
||||||
max-width: 300px;
|
|
||||||
line-height: 30px;
|
|
||||||
color: black;
|
|
||||||
padding: 5px;
|
|
||||||
p {
|
|
||||||
.api-msg-enabled {
|
|
||||||
color: green;
|
|
||||||
}
|
|
||||||
.api-msg-disabled {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.api-ic {
|
.api-ic {
|
||||||
height: 18px;
|
height: 18px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background: url(../images/explorer_icons.png) no-repeat;
|
background: url(../images/explorer_icons.png) no-repeat;
|
||||||
|
.api_information_panel {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: -5px;
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 5px;
|
||||||
|
display: none;
|
||||||
|
font-size: 13px;
|
||||||
|
max-width: 300px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: black;
|
||||||
|
padding: 5px;
|
||||||
|
p {
|
||||||
|
.api-msg-enabled {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
.api-msg-disabled {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-ic:hover {
|
||||||
|
.api_information_panel {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ic-info {
|
.ic-info {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
margin-top: -7px;
|
margin-top: -6px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.ic-warning {
|
.ic-warning {
|
||||||
background-position: -60px 0;
|
background-position: -60px 0;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
margin-top: -7px;
|
margin-top: -6px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.ic-error {
|
.ic-error {
|
||||||
background-position: -30px 0;
|
background-position: -30px 0;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
margin-top: -7px;
|
margin-top: -6px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.ic-off {
|
.ic-off {
|
||||||
|
|||||||
@@ -26,15 +26,15 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{#oauth}}
|
{{#oauth}}
|
||||||
<div class="auth">
|
<div class="auth">
|
||||||
<span class="api-ic ic-error"></span>{{/oauth}}
|
<span class="api-ic ic-error">{{/oauth}}
|
||||||
{{#each oauth}}
|
{{#each oauth}}
|
||||||
<div id="api_information_panel" style="top: 526px; left: 776px; display: none;">
|
<div class="api_information_panel">
|
||||||
{{#each this}}
|
{{#each this}}
|
||||||
<div title='{{{this.description}}}'>{{this.scope}}</div>
|
<div title='{{{this.description}}}'>{{this.scope}}</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#oauth}}</div>{{/oauth}}
|
{{#oauth}}</span></div>{{/oauth}}
|
||||||
{{#oauth}}
|
{{#oauth}}
|
||||||
<div class='access'>
|
<div class='access'>
|
||||||
<span class="api-ic ic-off" title="click to authenticate"></span>
|
<span class="api-ic ic-off" title="click to authenticate"></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user