Merge pull request #3685 from Simpler1/shift-delete-event

feat(event): Shift delete with no confirm
pull/3688/head
Isaac Connor 2023-04-07 12:03:55 -04:00 committed by GitHub
commit 7b3a613474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 11 deletions

View File

@ -1193,18 +1193,26 @@ function initPage() {
}
evt.preventDefault();
if (!$j('#deleteConfirm').length) {
// Load the delete confirmation modal into the DOM
$j.getJSON(thisUrl + '?request=modal&modal=delconfirm')
.done(function(data) {
insertModalHtml('deleteConfirm', data.html);
manageDelConfirmModalBtns();
$j('#deleteConfirm').modal('show');
})
.fail(logAjaxFail);
return;
if (window.event.shiftKey) {
$j.getJSON(thisUrl + '?request=event&action=delete&id='+eventData.Id)
.done(function(data) {
streamNext(true);
})
.fail(logAjaxFail);
} else {
if (!$j('#deleteConfirm').length) {
// Load the delete confirmation modal into the DOM
$j.getJSON(thisUrl + '?request=modal&modal=delconfirm')
.done(function(data) {
insertModalHtml('deleteConfirm', data.html);
manageDelConfirmModalBtns();
$j('#deleteConfirm').modal('show');
})
.fail(logAjaxFail);
return;
}
$j('#deleteConfirm').modal('show');
}
$j('#deleteConfirm').modal('show');
});
document.addEventListener('fullscreenchange', fullscreenChangeEvent);
} // end initPage