mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-19 05:47:53 +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);
|
||||
changeToViewMode();
|
||||
updateButtons();
|
||||
$('div.dataTables_scrollBody').height($('#samples').height());
|
||||
},
|
||||
preDrawCallback: function() {
|
||||
animateSpinner(this);
|
||||
|
@ -440,6 +441,17 @@ function onClickEdit() {
|
|||
|
||||
// Adjust columns width in table header
|
||||
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) {
|
||||
if (e.status == 403) {
|
||||
|
|
Loading…
Reference in a new issue