Skip to content

Commit

Permalink
Update swagger sidebar to match underlying swagger-ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Jul 6, 2016
1 parent 31b304f commit c7e2755
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-node-swagger",
"version": "0.1.7",
"version": "0.1.8",
"description": "A set of tools for generating Swagger API documentation based on the HTTP nodes deployed in a flow",
"license": "Apache",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions swagger/swagger-ui/swagger-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link href='reqs/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='reqs/css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='reqs/css/screen.css' media='print' rel='stylesheet' type='text/css'/>
<link href='reqs/css/print.css' media='print' rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="../vendor/font-awesome/css/font-awesome.min.css">
<script src='reqs/lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='reqs/lib/jquery.slideto.min.js' type='text/javascript'></script>
Expand All @@ -16,6 +17,7 @@
<script src='reqs/lib/backbone-min.js' type='text/javascript'></script>
<script src='reqs/swagger-ui.js' type='text/javascript'></script>
<script src='reqs/lib/highlight.7.3.pack.js' type='text/javascript'></script>
<script src='reqs/lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='reqs/lib/marked.js' type='text/javascript'></script>
<script src='reqs/i18next.min.js' type='text/javascript'></script>
<script type="text/javascript">
Expand Down
6 changes: 1 addition & 5 deletions swagger/swagger.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
swaggerDocUrl = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + RED.settings.httpNodeRoot + 'http-api/swagger.json';
var swaggerFrame = $("<iframe/>", {
id:"swagger-ui-frame",
style:"margin: 0; padding: 0; border: none; width: 100%",
style:"margin: 0; padding: 0; border: none; width: 100%; height: 100%",
src: "swagger-ui/swagger-ui.html"
}).appendTo(content);
RED.sidebar.addTab({
Expand All @@ -141,10 +141,6 @@

swaggerFrame.load(function(){
swaggerUi = document.getElementById('swagger-ui-frame').contentWindow.swaggerUi;
window.addEventListener('resize', function(event){
swaggerFrame.css('height', content.height());
});
swaggerFrame.css('height', content.height());
swaggerUi.load();
});
},
Expand Down

0 comments on commit c7e2755

Please sign in to comment.