mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-19 14:01:03 +08:00
adjust samples tables height when in edit mode selecting sample type or group
This commit is contained in:
parent
f8237e025a
commit
577e526fec
1 changed files with 12 additions and 0 deletions
|
@ -90,6 +90,7 @@ function dataTableInit() {
|
||||||
animateSpinner(this, false);
|
animateSpinner(this, false);
|
||||||
changeToViewMode();
|
changeToViewMode();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
$('div.dataTables_scrollBody').height($('#samples').height());
|
||||||
},
|
},
|
||||||
preDrawCallback: function() {
|
preDrawCallback: function() {
|
||||||
animateSpinner(this);
|
animateSpinner(this);
|
||||||
|
@ -440,6 +441,17 @@ function onClickEdit() {
|
||||||
|
|
||||||
// Adjust columns width in table header
|
// Adjust columns width in table header
|
||||||
table.columns.adjust();
|
table.columns.adjust();
|
||||||
|
|
||||||
|
// Adjust tables height when selecting sample type or group
|
||||||
|
$('.btn-group.bootstrap-select.show-tick').on('shown.bs.dropdown', function () {
|
||||||
|
var dropdown_height = $('.dropdown-menu.open').height();
|
||||||
|
var table_body = $('div.dataTables_scrollBody');
|
||||||
|
table_body.height(table_body.height()+dropdown_height+6);
|
||||||
|
})
|
||||||
|
.on('hidden.bs.dropdown', function(){
|
||||||
|
$('div.dataTables_scrollBody').height($('#samples').height());
|
||||||
|
});
|
||||||
|
$('div.dataTables_scrollBody').height($('#samples').height());
|
||||||
},
|
},
|
||||||
error: function (e, data, status, xhr) {
|
error: function (e, data, status, xhr) {
|
||||||
if (e.status == 403) {
|
if (e.status == 403) {
|
||||||
|
|
Loading…
Reference in a new issue