mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
Prevent new tab opening in tables and href="#"
This commit is contained in:
parent
26d696372f
commit
1c666d88e6
@ -458,7 +458,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for ctrl or cmd click to open new tab unless clicking on a multiselect row
|
// Check for ctrl or cmd click to open new tab unless clicking on a multiselect row
|
||||||
if ((event.ctrlKey || event.metaKey) && ! $a.parent().parent('table.multiselect').length > 0) {
|
if ((event.ctrlKey || event.metaKey) && ! $a.parent().parent('table').length > 0 && href !== '#') {
|
||||||
window.open(href, linkTarget);
|
window.open(href, linkTarget);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -466,7 +466,7 @@
|
|||||||
// Special checks for link clicks in action tables
|
// Special checks for link clicks in action tables
|
||||||
if (! $a.is('tr[href]') && $a.closest('table.action').length > 0) {
|
if (! $a.is('tr[href]') && $a.closest('table.action').length > 0) {
|
||||||
|
|
||||||
// ignoray clicks to ANY link with special key pressed
|
// ignore clicks to ANY link with special key pressed
|
||||||
if ($a.closest('table.multiselect').length > 0 && (event.ctrlKey || event.metaKey || event.shiftKey)) {
|
if ($a.closest('table.multiselect').length > 0 && (event.ctrlKey || event.metaKey || event.shiftKey)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user