Use ajax() instead of getJSON with no timeout when deleting events.

pull/3644/merge
Isaac Connor 2023-01-03 13:36:43 -05:00
parent 5c9201cad3
commit 51faa4f8dd
1 changed files with 10 additions and 6 deletions

View File

@ -157,8 +157,12 @@ function deleteEvents(event_ids) {
const chunk = event_ids.splice(0, 10);
console.log('Deleting ' + chunk.length + ' selections. ' + event_ids.length);
$j.getJSON(thisUrl + '?request=events&task=delete&eids[]='+chunk.join('&eids[]='))
.done( function(data) {
$j.ajax({
method: 'get',
timeout: 0,
url: thisUrl + '?request=events&task=delete',
data: {'eids[]': chunk},
success: function(data) {
if (!event_ids.length) {
$j('#eventTable').bootstrapTable('refresh');
$j('#deleteConfirm').modal('hide');
@ -170,13 +174,13 @@ function deleteEvents(event_ids) {
}
deleteEvents(event_ids);
}
})
.fail( function(jqxhr) {
console.log('Fail delete');
},
fail: function(jqxhr) {
logAjaxFail(jqxhr);
$j('#eventTable').bootstrapTable('refresh');
$j('#deleteConfirm').modal('hide');
});
}
});
}
function getEventDetailModal(eid) {