commit 33be3922c48620822fd7b3fe66a8a7d65ff274cc
parent 9dac4cdceaac5d60d66abe328d3c5863d4ee9185
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Mon, 12 Aug 2024 18:11:31 -0700
Fix usage of ui.input in floorplans gallery
I updated the functions without changing the usage here a bit ago.
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/files/floorplans/main.js b/files/floorplans/main.js
@@ -138,12 +138,15 @@ function editable_floorplan_func(element, data) {
let input
let c = floorplan_info_class(editables[i])
let e = parent.querySelector("." + c) // .getElementsByClassName()
+ let memo = "Edit floorplan " + editables[i]
if (e) {
- input = ui.input(editables[i], { value: e.textContent })
+ input = ui.input(editables[i], memo, {
+ attributes: { value: e.textContent }
+ })
input.setAttribute("class", c)
e.replaceWith(input)
} else {
- input = ui.input(editables[i])
+ input = ui.input(editables[i], memo)
input.setAttribute("class", c)
if (prev) {
prev.after(input)