mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 14:44:26 +08:00
Merge pull request #365 from okriuchykhin/ok_SCI_807
Fix buttons disappear when deleting columns in samples [SCI-807]
This commit is contained in:
commit
e826791429
1 changed files with 5 additions and 5 deletions
|
@ -1213,6 +1213,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();
|
||||||
|
|
||||||
|
@ -1234,11 +1239,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…
Reference in a new issue