mirror of https://gitee.com/bigwinds/arangodb
better handling of api documentation box size
This commit is contained in:
parent
63f6d1da98
commit
02fb2c2939
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -229,7 +229,7 @@ main {
|
|||
iframe {
|
||||
border: 0;
|
||||
border-radius: 3px;
|
||||
height: 600px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue