From 36a0496dd7d8a60791f8a493b8b499a375e24a74 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 24 Aug 2021 13:11:37 +1000 Subject: [PATCH] Wrap search preview results in - Allows clicking with middle mouse (for e.g.) to open in new tab --- InvenTree/templates/js/dynamic/inventree.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/InvenTree/templates/js/dynamic/inventree.js b/InvenTree/templates/js/dynamic/inventree.js index 21e667adcb..acfd57762c 100644 --- a/InvenTree/templates/js/dynamic/inventree.js +++ b/InvenTree/templates/js/dynamic/inventree.js @@ -111,9 +111,17 @@ function inventreeDocReady() { }, create: function () { $(this).data('ui-autocomplete')._renderItem = function (ul, item) { - return $('
  • ') - .append('' + imageHoverIcon(item.thumbnail) + item.label + '') - .appendTo(ul); + + var html = ``; + + html += ` `; + html += item.label; + + html += ''; + + return $('
  • ').append(html).appendTo(ul); }; }, select: function( event, ui ) {