feat: burg group editor - form

This commit is contained in:
Azgaar 2024-10-07 23:44:17 +02:00
parent 511d8f37d8
commit b6708bf698
11 changed files with 274 additions and 68 deletions

View file

@ -368,14 +368,17 @@ function overviewMilitary() {
const filtered = data.filter(datum => datum.i && !datum.removed);
const lines = filtered.map(
({i, name, fullName, color}) =>
`<tr data-tip="${name}"><td><span style="color:${color}">⬤</span></td>
<td><input data-i="${i}" id="el${i}" type="checkbox" class="checkbox" ${
!initial.length || initial.includes(i) ? "checked" : ""
} >
<label for="el${i}" class="checkbox-label">${fullName || name}</label>
</td></tr>`
({i, name, fullName, color}) => /* html */ `
<tr data-tip="${name}">
<td><span style="color:${color}"></span></td>
<td>
<input data-i="${i}" id="el${i}" type="checkbox" class="checkbox"
${!initial.length || initial.includes(i) ? "checked" : ""} >
<label for="el${i}" class="checkbox-label">${fullName || name}</label>
</td>
</tr>`
);
alertMessage.innerHTML = /* html */ `<b>Limit unit by ${type}:</b>
<table style="margin-top:.3em">
<tbody>
@ -385,7 +388,7 @@ function overviewMilitary() {
$("#alert").dialog({
width: fitContent(),
title: `Limit unit`,
title: "Limit unit",
buttons: {
Invert: function () {
alertMessage.querySelectorAll("input").forEach(el => (el.checked = !el.checked));