1
0
Fork 0

better handling of api documentation box size

This commit is contained in:
hkernbach 2016-06-17 09:26:44 +02:00
parent 63f6d1da98
commit 02fb2c2939
3 changed files with 26 additions and 3 deletions

View File

@ -25,6 +25,16 @@
'mouseleave #app-scripts': 'hideDropdown'
},
resize: function(auto) {
if (auto) {
$('.innerContent').css('height', 'auto');
}
else {
$('.innerContent').height($('.centralRow').height() - 150);
$('#swagger iframe').height($('.centralRow').height() - 150);
}
},
changeSubview: function(e) {
_.each(this.navs, function(nav) {
$(nav).removeClass('active');
@ -38,17 +48,21 @@
});
if (e.currentTarget.id === 'service-readme') {
this.resize(true);
$('#readme').show();
}
else if (e.currentTarget.id === 'service-api') {
this.resize();
$('#swagger').show();
}
else if (e.currentTarget.id === 'service-info') {
this.resize(true);
this.render();
$('#information').show();
$('#sideinformation').show();
}
else if (e.currentTarget.id === 'service-settings') {
this.resize(true);
this.showConfigDialog();
$('.headerButtonBar').show();
$('#settings').show();
@ -216,6 +230,7 @@
},
render: function(mode) {
this.resize();
this.model.fetchThumbnail(function() {
var callback = function(error, db) {
var self = this;

View File

@ -18,8 +18,13 @@
this.$el.html(this.template.render({}));
},
resize: function() {
$('.innerContent').height($('.centralRow').height() - 170);
resize: function(auto) {
if (auto) {
$('.innerContent').css('height', 'auto');
}
else {
$('.innerContent').height($('.centralRow').height() - 170);
}
},
renderSwagger: function() {
@ -48,6 +53,9 @@
$('#swagger iframe').css('margin-top', '-13px');
self.resize();
}
else {
self.resize(true);
}
$('#' + view).show();
}
});

View File

@ -229,7 +229,7 @@ main {
iframe {
border: 0;
border-radius: 3px;
height: 600px;
height: 100%;
width: 100%;
}
}