Fix bugs in #53

This commit is contained in:
Khanh Ngo
2016-06-29 00:22:11 +07:00
parent 7f5a57f80c
commit c7efb85feb
2 changed files with 7 additions and 4 deletions

View File

@ -152,10 +152,11 @@
var modal = $("#modal_delete");
var table = $("#tbl_records").DataTable();
var record = $(this).prop('id');
var nRow = $(this).parents('tr')[0];
var info = "Are you sure you want to delete " + record + "?";
modal.find('.modal-body p').text(info);
modal.find('#button_delete_confirm').click(function() {
table.row($(this).parents('tr')[0]).remove().draw();
table.row(nRow).remove().draw();
modal.modal('hide');
})
modal.modal('show');