From 259efc81fd76072246a37b1b193e7e0175a8f342 Mon Sep 17 00:00:00 2001 From: aronwk-aaron Date: Sat, 18 Nov 2023 01:13:05 -0600 Subject: [PATCH] fix: don't show count of 1 on items fix: tooltips on lazy loaded items --- app/templates/base.html.j2 | 3 ++- app/templates/partials/charxml/_inv_grid.html.j2 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index a7b6a94..bb377ac 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -96,7 +96,7 @@ }) function setInnerHTML(elm, html) { elm.innerHTML = html; - + $("body").tooltip({ selector: '[data-toggle=tooltip]' }); Array.from(elm.querySelectorAll("script")) .forEach( oldScriptEl => { const newScriptEl = document.createElement("script"); @@ -109,6 +109,7 @@ newScriptEl.appendChild(scriptText); oldScriptEl.parentNode.replaceChild(newScriptEl, oldScriptEl); + }); } diff --git a/app/templates/partials/charxml/_inv_grid.html.j2 b/app/templates/partials/charxml/_inv_grid.html.j2 index bb3c7f2..679bafc 100644 --- a/app/templates/partials/charxml/_inv_grid.html.j2 +++ b/app/templates/partials/charxml/_inv_grid.html.j2 @@ -17,7 +17,7 @@ {%if inv_item.attr_c|int > 999 %} +999 - {% else %} + {% elif inv_item.attr_c|int > 1 %} {{ inv_item.attr_c }} {% endif %}