mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-25 06:57:19 +00:00
fix: don't show count of 1 on items
fix: tooltips on lazy loaded items
This commit is contained in:
parent
b9fc039a7e
commit
259efc81fd
@ -96,7 +96,7 @@
|
|||||||
})
|
})
|
||||||
function setInnerHTML(elm, html) {
|
function setInnerHTML(elm, html) {
|
||||||
elm.innerHTML = html;
|
elm.innerHTML = html;
|
||||||
|
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
|
||||||
Array.from(elm.querySelectorAll("script"))
|
Array.from(elm.querySelectorAll("script"))
|
||||||
.forEach( oldScriptEl => {
|
.forEach( oldScriptEl => {
|
||||||
const newScriptEl = document.createElement("script");
|
const newScriptEl = document.createElement("script");
|
||||||
@ -109,6 +109,7 @@
|
|||||||
newScriptEl.appendChild(scriptText);
|
newScriptEl.appendChild(scriptText);
|
||||||
|
|
||||||
oldScriptEl.parentNode.replaceChild(newScriptEl, oldScriptEl);
|
oldScriptEl.parentNode.replaceChild(newScriptEl, oldScriptEl);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<span class="inventory-count text-bold">
|
<span class="inventory-count text-bold">
|
||||||
{%if inv_item.attr_c|int > 999 %}
|
{%if inv_item.attr_c|int > 999 %}
|
||||||
+999
|
+999
|
||||||
{% else %}
|
{% elif inv_item.attr_c|int > 1 %}
|
||||||
{{ inv_item.attr_c }}
|
{{ inv_item.attr_c }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user