Fix merging conflict
This commit is contained in:
@@ -409,13 +409,38 @@ DOCUMENTATION :: END
|
|||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table', history_table);
|
||||||
|
|
||||||
$('#row-edit-mode').click(function() {
|
$('#row-edit-mode').on('click', function() {
|
||||||
|
$('#row-edit-mode-alert').fadeIn(200);
|
||||||
|
|
||||||
if ($(this).hasClass('active')) {
|
if ($(this).hasClass('active')) {
|
||||||
$('.delete-control').each(function() {
|
if (history_to_delete.length > 0) {
|
||||||
|
$('#deleteCount').text(history_to_delete.length);
|
||||||
|
$('#confirm-modal').modal();
|
||||||
|
$('#confirm-modal').one('click', '#confirm-delete', function () {
|
||||||
|
for (var i = 0; i < history_to_delete.length; i++) {
|
||||||
|
$.ajax({
|
||||||
|
url: 'delete_history_rows',
|
||||||
|
data: { row_id: history_to_delete[i] },
|
||||||
|
async: true,
|
||||||
|
success: function (data) {
|
||||||
|
var msg = "History deleted";
|
||||||
|
showMsg(msg, false, true, 2000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
history_table.draw();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.delete-control').each(function () {
|
||||||
$(this).addClass('hidden');
|
$(this).addClass('hidden');
|
||||||
|
$('#row-edit-mode-alert').fadeOut(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
history_to_delete = [];
|
||||||
$('.delete-control').each(function() {
|
$('.delete-control').each(function() {
|
||||||
|
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
|
||||||
$(this).removeClass('hidden');
|
$(this).removeClass('hidden');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user