From 9cfcb6579fe573223512986368e06f1a47b9a5ff Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 4 Nov 2021 16:48:24 +1100 Subject: [PATCH 1/4] Fixes for search auto-complete dropdown menu - Fix rendering of badges - Menu fills out right-to-left --- .../static/script/inventree/inventree.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js index 5d393a085a..5974e12fc5 100644 --- a/InvenTree/InvenTree/static/script/inventree/inventree.js +++ b/InvenTree/InvenTree/static/script/inventree/inventree.js @@ -158,14 +158,13 @@ function inventreeDocReady() { create: function() { $(this).data('ui-autocomplete')._renderItem = function(ul, item) { - var html = ``; - - html += ` `; - html += item.label; - - html += ''; + var html = ` +
+ + ${item.label} + + + `; if (user_settings.SEARCH_SHOW_STOCK_LEVELS) { html += partStockLabel( @@ -176,7 +175,7 @@ function inventreeDocReady() { ); } - html += ''; + html += '
'; return $('
  • ').append(html).appendTo(ul); }; @@ -188,6 +187,10 @@ function inventreeDocReady() { classes: { 'ui-autocomplete': 'dropdown-menu search-menu', }, + position: { + my : "right top", + at: "right bottom" + } }); } From b1598cfd10d2162e53cee4a709b7a3dff26b31a9 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 4 Nov 2021 17:02:52 +1100 Subject: [PATCH 2/4] - style fixes - add part description as mouse-over text --- InvenTree/InvenTree/static/css/inventree.css | 5 +++++ InvenTree/InvenTree/static/script/inventree/inventree.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index a686b5c512..478734383f 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -560,6 +560,11 @@ transition: 0.1s; } +.search-autocomplete-item { + border-top: 1px solid #EEE; + margin-bottom: 2px; +} + .modal { overflow: hidden; z-index: 9999; diff --git a/InvenTree/InvenTree/static/script/inventree/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js index 5974e12fc5..df48cf7d60 100644 --- a/InvenTree/InvenTree/static/script/inventree/inventree.js +++ b/InvenTree/InvenTree/static/script/inventree/inventree.js @@ -159,9 +159,9 @@ function inventreeDocReady() { $(this).data('ui-autocomplete')._renderItem = function(ul, item) { var html = ` -
    +
    - ${item.label} + ${item.label} `; From 3ceb6f6ba8912f337659b2b370341b603a7581f4 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 4 Nov 2021 17:04:47 +1100 Subject: [PATCH 3/4] Fix barcode input --- InvenTree/templates/js/translated/barcode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/templates/js/translated/barcode.js b/InvenTree/templates/js/translated/barcode.js index fcced46f53..ac512df27d 100644 --- a/InvenTree/templates/js/translated/barcode.js +++ b/InvenTree/templates/js/translated/barcode.js @@ -36,7 +36,7 @@ function makeBarcodeInput(placeholderText='', hintText='') {
    - + From 76b5bc067ad11afdd55b58bae4b90d647ce9e035 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 4 Nov 2021 17:06:52 +1100 Subject: [PATCH 4/4] Fix notes field --- InvenTree/templates/js/translated/barcode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/templates/js/translated/barcode.js b/InvenTree/templates/js/translated/barcode.js index ac512df27d..4b61249d0b 100644 --- a/InvenTree/templates/js/translated/barcode.js +++ b/InvenTree/templates/js/translated/barcode.js @@ -59,7 +59,7 @@ function makeNotesField(options={}) {
    - +