Allow to fully customize click and submit handling

resolves #3767
This commit is contained in:
Loei Petrus Marogi 2019-05-27 11:03:49 +02:00
parent 96f3807610
commit 302422d814
2 changed files with 12 additions and 0 deletions

View File

@ -378,6 +378,10 @@
var $tr = $(event.currentTarget);
var table = new Selection($tr.closest('table.action, table.table-row-selectable')[0], _this.icinga);
if ($tr.closest('[data-no-icinga-ajax]').length > 0) {
return true;
}
// some rows may contain form actions that trigger a different action, pass those through
if (!$target.hasClass('rowaction') && $target.closest('form').length &&
($target.closest('a').length || // allow regular link clinks

View File

@ -249,6 +249,10 @@
$form.removeData('submitButton');
}
if ($form.closest('[data-no-icinga-ajax]').length > 0) {
return true;
}
if ($button.length === 0) {
var $el;
@ -457,6 +461,10 @@
return true;
}
if ($a.closest('[data-no-icinga-ajax]').length > 0) {
return true;
}
// Check for ctrl or cmd click to open new tab unless clicking on a multiselect row
if ((event.ctrlKey || event.metaKey) && href !== '#' && $a.is('a')) {
window.open(href, linkTarget);