$('#editabledatatable').on("click", 'a.delete', function(e) {
e.preventDefault();
if (confirm("确定要删除此行?") == false) {
return;
}
var table = $('#editabledatatable').dataTable();
var nRow = $(this).parents('tr')[0];
var row = table.fnGetData(nRow);
console.log(row);
if (row.Id>0) {
alert(row.Id);
} else {
var nRow = $(this).parents('tr')[0];
console.log(nRow);
oTable.fnDeleteRow(nRow);
}
Notify('成功删除SKU.', 'bottom-right', '5000', 'danger', 'fa-warning', true);
});
e.preventDefault();
if (confirm("确定要删除此行?") == false) {
return;
}
var table = $('#editabledatatable').dataTable();
var nRow = $(this).parents('tr')[0];
var row = table.fnGetData(nRow);
console.log(row);
if (row.Id>0) {
alert(row.Id);
} else {
var nRow = $(this).parents('tr')[0];
console.log(nRow);
oTable.fnDeleteRow(nRow);
}
Notify('成功删除SKU.', 'bottom-right', '5000', 'danger', 'fa-warning', true);
});