fix: [UI] Multi select and deletion of events fixed, #5046

pull/5048/head
iglocska 2019-08-23 11:56:50 +02:00
parent 82f53d9a09
commit e4708c0b6c
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 6 additions and 10 deletions

View File

@ -2320,8 +2320,6 @@ class EventsController extends AppController
throw new NotFoundException(__('Invalid event'));
}
$id = $temp['Event']['id'];
} elseif (!is_numeric($id)) {
throw new NotFoundException(__('Invalid event'));
}
if ($this->request->is('post') || $this->request->is('put') || $this->request->is('delete')) {
if (isset($this->request->data['id'])) {

View File

@ -1619,14 +1619,10 @@ function getPopup(id, context, target, admin, popupType) {
$(popupType).html(data);
openPopup(popupType, false);
},
error:function(xhr) {
error:function() {
$(".loading").hide();
$("#gray_out").fadeOut();
if (xhr.status === 403) {
showMessage('fail', 'Not allowed.');
} else {
showMessage('fail', 'Something went wrong - the queried function returned an exception. Contact your administrator for further details (the exception has been logged).');
}
showMessage('fail', 'Something went wrong - the queried function returned an exception. Contact your administrator for further details (the exception has been logged).');
},
url: url
});
@ -3491,8 +3487,10 @@ function attributeHoverPlacement(element) {
$('body').on('click', function (e) {
$('[data-toggle=popover]').each(function () {
// hide any open popovers when the anywhere else in the body is clicked
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
$('#' + currentPopover).popover('destroy');
if (typeof currentPopover !== 'undefined') {
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
$('#' + currentPopover).popover('destroy');
}
}
});
});