Skip to content

Commit

Permalink
fix: don't show count of 1 on items
Browse files Browse the repository at this point in the history
fix: tooltips on lazy loaded items
  • Loading branch information
aronwk-aaron committed Nov 18, 2023
1 parent b9fc039 commit 259efc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/templates/base.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -109,6 +109,7 @@
newScriptEl.appendChild(scriptText);
oldScriptEl.parentNode.replaceChild(newScriptEl, oldScriptEl);
});
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/partials/charxml/_inv_grid.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 259efc8

Please sign in to comment.