Merge pull request #365 from okriuchykhin/ok_SCI_807

Fix buttons disappear when deleting columns in samples [SCI-807]
This commit is contained in:
okriuchykhin 2016-12-30 15:43:13 +01:00 committed by GitHub
commit e826791429

View file

@ -1213,6 +1213,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();
@ -1234,11 +1239,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();