Add the id's for counters

This commit is contained in:
Aaron Kable
2026-01-09 11:33:16 +08:00
parent 0c0f2fd5ba
commit 70caf7606c
2 changed files with 15 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
{% translate "Join Requests" %}
{% if acceptrequests %}
<span class="badge text-bg-secondary">{{ acceptrequests|length }}</span>
<span id="acceptRequestsCounter" class="badge text-bg-secondary">{{ acceptrequests|length }}</span>
{% endif %}
</a>
</li>
@@ -30,7 +30,7 @@
{% translate "Leave Requests" %}
{% if leaverequests %}
<span class="badge text-bg-secondary">{{ leaverequests|length }}</span>
<span id="leaveRequestsCounter" class="badge text-bg-secondary">{{ leaverequests|length }}</span>
{% endif %}
</a>
</li>
@@ -48,7 +48,7 @@
<div id="add" class="tab-pane active">
{% if acceptrequests %}
<div>
<table id="table-add" class="table table-responsive">
<table id="table-add" class="table table-responsive w-100">
<thead>
<tr>
<th>{% translate "Character" %}</th>
@@ -123,7 +123,7 @@
<div id="leave" class="tab-pane">
{% if leaverequests %}
<div>
<table id="table-rem" class="table table-responsive">
<table id="table-rem" class="table table-responsive w-100">
<thead>
<tr>
<th>{% translate "Character" %}</th>
@@ -322,6 +322,16 @@
});
});
// Filter Dropdown sets widths so lets remove them when we tab change so they actually show.
$('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
let elems = document.querySelectorAll(".form-select");
elems.forEach(
function(e) {
e.style.maxWidth = "";
}
);
});
});
</script>
{% endblock extra_javascript %}

View File

@@ -20,7 +20,7 @@ $(document).ready(() => {
if (badges.length > 0 && notificationCount > 0) {
const notificationBadge = document.createElement('span');
notificationBadge.id = "globalNotificationCount";
notificationBadge.classList.add(
'badge',
'text-bg-danger',