mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 16:14:58 +08:00
Fix buttons disappear when deleting columns in samples datatable [SCI-807]
This commit is contained in:
parent
c8631077df
commit
42f71f4da8
1 changed files with 5 additions and 5 deletions
|
@ -1200,6 +1200,11 @@ function changeToEditMode() {
|
||||||
|
|
||||||
form
|
form
|
||||||
.on('ajax:success', function() {
|
.on('ajax:success', function() {
|
||||||
|
// Preserve save/delete buttons as we need them after new table
|
||||||
|
// will be created
|
||||||
|
$('div.toolbarButtons').appendTo('div.samples-table');
|
||||||
|
$('div.toolbarButtons').hide();
|
||||||
|
|
||||||
// Destroy datatable
|
// Destroy datatable
|
||||||
table.destroy();
|
table.destroy();
|
||||||
|
|
||||||
|
@ -1221,11 +1226,6 @@ function changeToEditMode() {
|
||||||
$('#samples thead').empty();
|
$('#samples thead').empty();
|
||||||
$('#samples thead').append(originalHeader);
|
$('#samples thead').append(originalHeader);
|
||||||
|
|
||||||
// Preserve save/delete buttons as we need them after new table
|
|
||||||
// will be created
|
|
||||||
$('div.toolbarButtons').appendTo('div.samples-table');
|
|
||||||
$('div.toolbarButtons').hide();
|
|
||||||
|
|
||||||
// Re-initialize datatable
|
// Re-initialize datatable
|
||||||
table = dataTableInit();
|
table = dataTableInit();
|
||||||
loadColumnsNames();
|
loadColumnsNames();
|
||||||
|
|
Loading…
Add table
Reference in a new issue