Added hover over popup to display property validation attributes

swagger-ui does not render all Parameter-fields #808
This commit is contained in:
Brian Shamblen
2015-01-29 10:11:13 -08:00
parent b7a7607820
commit d7ac2f7232
8 changed files with 246 additions and 2 deletions

View File

@@ -64,6 +64,13 @@ class MainView extends Backbone.View
@addResource resource, @model.auths
@
$('.propWrap').hover(
->
$('.optionsWrapper', $(this)).show()
,->
$('.optionsWrapper', $(this)).hide()
)
addResource: (resource, auths) ->
# Render a resource and add it to resources li
resource.id = resource.id.replace(/\s/g, '_')

View File

@@ -391,6 +391,32 @@
font-weight: bold;
color: #000;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
border-spacing: 0;
position: absolute;
background-color: #ffffff;
border: 1px solid #bbbbbb;
display: none;
font-size: 11px;
max-width: 400px;
line-height: 30px;
color: black;
padding: 5px;
margin-left: 10px;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
text-align: center;
background-color: #eeeeee;
border: 1px solid #bbbbbb;
font-size: 11px;
color: #666666;
font-weight: bold;
padding: 5px;
line-height: 15px;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
font-weight: bold;
}
.swagger-section .swagger-ui-wrap .model-signature .propName {
font-weight: bold;
}

View File

@@ -281,6 +281,34 @@
font-weight: bold;
color: #000;
}
.propWrap {
.optionsWrapper {
border-spacing: 0;
position: absolute;
background-color: #ffffff;
border: 1px solid #bbbbbb;
display: none;
font-size: 11px;
max-width: 400px;
line-height: 30px;
color: black;
padding: 5px;
margin-left:10px;
th {
text-align: center;
background-color: #eeeeee;
border: 1px solid #bbbbbb;
font-size: 11px;
color: #666666;
font-weight: bold;
padding: 5px;
line-height: 15px;
}
.optionName {
font-weight: bold;
}
}
}
}
.propName {
font-weight: bold;