Make modals static. Hide some settings. Minor optimizations. Switch from NPM bach to CDN.
This commit is contained in:
@@ -2,10 +2,11 @@ const swalClasses = {
|
||||
container: 'text-center',
|
||||
confirmButton: 'btn btn-lg btn-primary',
|
||||
cancelButton: 'btn btn-lg btn-secondary ms-3',
|
||||
denyButton: 'btn btn-lg btn-secondary ms-3',
|
||||
popup: 'border p-5',
|
||||
title: 'fs-2',
|
||||
inputLabel: 'fs-5',
|
||||
htmlContainer: 'fs-5'
|
||||
inputLabel: 'fs-5 text-secondary-emphasis',
|
||||
htmlContainer: 'fs-5 text-center text-secondary-emphasis',
|
||||
};
|
||||
|
||||
function showSingleCalcDialog(btn) {
|
||||
@@ -21,7 +22,7 @@ function showSingleCalcDialog(btn) {
|
||||
buttonsStyling: false
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
htmx.ajax('POST', '/score/' + result.value, {target: '#' + btn.id, swap: 'none'})
|
||||
let promise = htmx.ajax('POST', '/score/' + result.value, {target: '#' + btn.id, swap: 'none'});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -72,7 +73,7 @@ function confirmAndTrigger(btn) {
|
||||
buttonsStyling: false
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
htmx.trigger(btn, 'confirmed');
|
||||
htmx.trigger(btn, 'confirmed', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -94,7 +95,7 @@ function createCodeDialog(btn) {
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
btn.setAttribute('hx-vals', '{"user_role": "' + result.value + '"}');
|
||||
htmx.trigger(btn, 'confirmed');
|
||||
htmx.trigger(btn, 'confirmed', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const tooltipTriggerList = document.querySelectorAll('[config-bs-toggle="tooltip"]');
|
||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
||||
tooltipTriggerList.forEach((elem) => {
|
||||
new bootstrap.Tooltip(elem);
|
||||
});
|
||||
@@ -111,7 +111,7 @@ function loadClans() {
|
||||
}
|
||||
|
||||
function updateSelectedPlayers(sender) {
|
||||
const playerList = sender.parentElement.parentElement.parentElement;
|
||||
const playerList = sender.parentElement.parentElement.parentElement.parentElement;
|
||||
const checkCounter = playerList.parentElement.parentElement.querySelector('span.badge');
|
||||
let counter = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user