Fix buttons disappear when deleting columns in samples datatable [SCI-807]

This commit is contained in:
Oleksii Kriuchykhin 2016-12-20 09:49:21 +01:00
parent c8631077df
commit 42f71f4da8

View file

@ -1200,6 +1200,11 @@ function changeToEditMode() {
form
.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
table.destroy();
@ -1221,11 +1226,6 @@ function changeToEditMode() {
$('#samples thead').empty();
$('#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
table = dataTableInit();
loadColumnsNames();