use float left on legend and input-grid to remove legend span nesting,

improve linting tool
This commit is contained in:
2023-07-06 04:53:47 +00:00
parent 8a37615721
commit 893f4aad54
5 changed files with 15 additions and 13 deletions

View File

@@ -548,7 +548,7 @@ async function handleNetworkDelete () {
const header = `Delete net${netID}`;
const body = "";
const d = dialog(header, body, async (result, form) => {
dialog(header, body, async (result, form) => {
if (result === "confirm") {
document.querySelector(`img[data-network="${netID}"]`).src = "images/status/loading.svg";
const result = await requestAPI(`/${node}/${type}/${vmid}/net/net${netID}/delete`, "DELETE");
@@ -572,7 +572,7 @@ async function handleNetworkAdd () {
body += "<label for=\"name\">Interface Name</label><input type=\"text\" id=\"name\" name=\"name\" class=\"w3-input w3-border\"></input>";
}
const d = dialog(header, body, async (result, form) => {
dialog(header, body, async (result, form) => {
if (result === "confirm") {
const body = {
rate: form.get("rate")
@@ -702,7 +702,7 @@ async function handleDeviceDelete () {
const header = `Remove Expansion Card ${deviceID}`;
const body = "";
const d = dialog(header, body, async (result, form) => {
dialog(header, body, async (result, form) => {
if (result === "confirm") {
document.querySelector(`img[data-device="${deviceID}"]`).src = "images/status/loading.svg";
const result = await requestAPI(`/${node}/${type}/${vmid}/pci/hostpci${deviceID}/delete`, "DELETE");

View File

@@ -11,15 +11,12 @@ export function dialog (header, body, callback = async (result, form) => { }) {
dialog.className = "w3-container w3-card w3-border-0";
dialog.querySelector("#prompt").innerText = header;
dialog.querySelector("form").innerHTML = body;
document.body.append(dialog);
dialog.showModal();
dialog.addEventListener("close", async () => {
await callback(dialog.returnValue, new FormData(dialog.querySelector("form")));
dialog.parentElement.removeChild(dialog);
});
document.body.append(dialog);
dialog.showModal();
return dialog;
}