Merge pull request #3794 from Icinga/feature/allow-to-fully-customize-click-and-submit-handling-3767

Allow to fully customize click and submit handling
This commit is contained in:
Johannes Meyer 2019-05-27 14:55:07 +02:00 committed by GitHub
commit ba5f6b1745
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);