Make ctrl-click open new tab

refs #3722
This commit is contained in:
Jennifer Mourek 2019-03-20 14:19:14 +01:00
parent 403c2d3495
commit 2c1abe13a1
2 changed files with 11 additions and 0 deletions

View File

@ -95,6 +95,11 @@
var _this = event.data.self;
var icinga = _this.icinga;
// Check for ctrl or cmd click to open new tab and don't unfold other menus
if (event.ctrlKey || event.metaKey) {
return false;
}
if (href.match(/#/)) {
// ...it may be a menu section without a dedicated link.
// Switch the active menu item:

View File

@ -457,6 +457,12 @@
return true;
}
// Check for ctrl or cmd click to open new tab
if (event.ctrlKey || event.metaKey) {
window.open(href, linkTarget);
return false;
}
// Special checks for link clicks in action tables
if (! $a.is('tr[href]') && $a.closest('table.action').length > 0) {