dialog confirmation for publish unpublish

This commit is contained in:
Zachary Chai
2016-11-07 17:19:54 -05:00
parent 9fad2a4ef8
commit bc7a77ef77
5 changed files with 35 additions and 2 deletions

View File

@ -11,6 +11,14 @@
var rowData = table.row("#"+data.record_id).data();
rowData.published = data.published
table.row("#"+data.record_id).data(rowData).draw();
var publish = (data.published) ? 'publish' : 'unpublish';
// show alert success alert
$('.alert-template .alert-message').html($('.'+publish+'-alert').html());
$('#alerts').html($('.alert-template').html());
setTimeout(function() {
$('#alerts > .alert').alert('close');
}, 4000);
}
});
};