From fcfcb96d0dd90a49b3ca7454e3cb72e65e9cf171 Mon Sep 17 00:00:00 2001 From: Scott Bedard Date: Sun, 6 Mar 2016 02:29:57 -0700 Subject: [PATCH] Add ctrl+click support for rowlinks Ctrl+click is supported pretty well in the backend, this adds it to rowlinks as well. --- modules/system/assets/ui/js/list.rowlink.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/system/assets/ui/js/list.rowlink.js b/modules/system/assets/ui/js/list.rowlink.js index d61038b81..d7d77207f 100644 --- a/modules/system/assets/ui/js/list.rowlink.js +++ b/modules/system/assets/ui/js/list.rowlink.js @@ -1,6 +1,6 @@ /* * Table row linking plugin - * + * * Data attributes: * - data-control="rowlink" - enables the plugin on an element * @@ -36,9 +36,11 @@ var href = link.attr('href'), onclick = (typeof link.get(0).onclick == "function") ? link.get(0).onclick : null - $(this).find('td').not('.' + options.excludeClass).click(function() { + $(this).find('td').not('.' + options.excludeClass).click(function(e) { if (onclick) onclick.apply(link.get(0)) + else if (e.ctrlKey) + window.open(href); else window.location = href; }) @@ -88,4 +90,4 @@ $('[data-control="rowlink"]').rowLink() }) -}(window.jQuery); \ No newline at end of file +}(window.jQuery);