fix: don't show count of 1 on items

fix: tooltips on lazy loaded items
This commit is contained in:
aronwk-aaron 2023-11-18 01:13:05 -06:00
parent b9fc039a7e
commit 259efc81fd
2 changed files with 3 additions and 2 deletions

View File

@ -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);
});
}
</script>

View File

@ -17,7 +17,7 @@
<span class="inventory-count text-bold">
{%if inv_item.attr_c|int > 999 %}
+999
{% else %}
{% elif inv_item.attr_c|int > 1 %}
{{ inv_item.attr_c }}
{% endif %}
</span>