data stored in object, not element data attrs

This commit is contained in:
Corban-Lee Jones 2024-04-18 12:51:22 +01:00
parent 1fb7622dd1
commit 545a812033
2 changed files with 1 additions and 6 deletions

View File

@ -109,11 +109,6 @@ function addServerTemplate(serverPrimaryKey, serverGuildId, serverName, serverIc
template = $($("#serverItemTemplate").html());
template.find("img").attr("src", `https://cdn.discordapp.com/icons/${serverGuildId}/${serverIconHash}.webp?size=80`);
template.attr("data-guild-id", serverGuildId);
template.attr("data-name", serverName);
template.attr("data-icon", serverIconHash);
template.attr("data-permissions", serverPermissions);
template.attr("data-isowner", serverIsOwner);
template.attr("data-id", serverPrimaryKey);
// Bind the button for selecting this server

View File

@ -29,7 +29,7 @@
{% block javascript %}
<script id="serverItemTemplate" type="text/template">
<li class="nav-item server-item" data-id="" data-guild-id="" data-name="" data-icon="">
<li class="nav-item server-item" data-id="">
<a href="#" class="nav-link px-3 py-2 rounded-0" data-bs-toggle="tooltip" data-bs-placement="right" data-bs-original-title="Option 1" aria-label="Option 1">
<img src="" alt="Guild Icon" class="rounded-circle" style="max-width: 100%;">
</a>