mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-10 22:53:06 +08:00
Merge pull request #432 from mlorb/ml-sci-fix-847
Add dynamic length for sample type/group field when adding new sample [SCI-847]
This commit is contained in:
commit
fd63a1de12
1 changed files with 10 additions and 5 deletions
|
@ -458,10 +458,7 @@ function onClickEdit() {
|
|||
});
|
||||
|
||||
// Adjust columns width in table header
|
||||
table.columns.adjust();
|
||||
$('.dropdown-menu').parent().on('shown.bs.dropdown hidden.bs.dropdown', function () {
|
||||
table.columns.adjust();
|
||||
});
|
||||
adjustTableHeader();
|
||||
},
|
||||
error: function (e, data, status, xhr) {
|
||||
if (e.status == 403) {
|
||||
|
@ -746,7 +743,7 @@ function onClickAddSample() {
|
|||
$("select[name=sample_type_id]").selectpicker();
|
||||
|
||||
// Adjust columns width in table header
|
||||
table.columns.adjust();
|
||||
adjustTableHeader();
|
||||
},
|
||||
error: function (e, eData, status, xhr) {
|
||||
if (e.status == 403)
|
||||
|
@ -787,6 +784,14 @@ function createTdElement(content) {
|
|||
return td;
|
||||
}
|
||||
|
||||
// Adjust columns width in table header
|
||||
function adjustTableHeader() {
|
||||
table.columns.adjust();
|
||||
$('.dropdown-menu').parent().on('shown.bs.dropdown hidden.bs.dropdown', function () {
|
||||
table.columns.adjust();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates select dropdown for sample type
|
||||
* @param {Object[]} data List of sample types
|
||||
|
|
Loading…
Reference in a new issue