From 9f08086c2728f086eb5411420709510613933a79 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 10 May 2019 17:46:20 -0600 Subject: [PATCH] Open `rowlink` rows in a new tab when the Command or Ctrl key is held down (previously only did it for the Ctrl key) --- modules/backend/widgets/lists/assets/js/october.list.js | 2 +- modules/system/assets/ui/js/list.rowlink.js | 2 +- modules/system/assets/ui/storm-min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/backend/widgets/lists/assets/js/october.list.js b/modules/backend/widgets/lists/assets/js/october.list.js index d3100aa64..ad30498ec 100644 --- a/modules/backend/widgets/lists/assets/js/october.list.js +++ b/modules/backend/widgets/lists/assets/js/october.list.js @@ -2,7 +2,7 @@ * List Widget * * Dependences: - * - Row Link Plugin (october.rowlink.js) + * - Row Link Plugin (system/assets/ui/js/list.rowlink.js) */ +function ($) { "use strict"; diff --git a/modules/system/assets/ui/js/list.rowlink.js b/modules/system/assets/ui/js/list.rowlink.js index 9be759538..de8add4c3 100644 --- a/modules/system/assets/ui/js/list.rowlink.js +++ b/modules/system/assets/ui/js/list.rowlink.js @@ -54,7 +54,7 @@ else if (popup) { link.popup() } - else if (e.ctrlKey) { + else if (e.ctrlKey || e.metaKey) { window.open(href) } else { diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index dc1a49f1a..c593cd51a 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -4042,7 +4042,7 @@ $(this).find('td').not('.'+options.excludeClass).click(function(e){if($(document if(onclick){onclick.apply(link.get(0))} else if(request){link.request()} else if(popup){link.popup()} -else if(e.ctrlKey){window.open(href)} +else if(e.ctrlKey||e.metaKey){window.open(href)} else{window.location=href}}) $(this).addClass(options.linkedClass) link.hide().after(link.html())})}