use float left on legend and input-grid to remove legend span nesting,
improve linting tool
This commit is contained in:
@@ -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");
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user