mirror of https://github.com/aredn/aredn.git
Fix bug in making new xlinks (#1105)
This commit is contained in:
parent
6d81b4c846
commit
6f30ab1cc5
|
@ -598,7 +598,7 @@ html.print([[
|
||||||
const row = document.createElement("tr");
|
const row = document.createElement("tr");
|
||||||
row.innerHTML = "<td><input type='text' value=''></td><td><input type='text' value=''></td><td><input type='text' value=''></td><td><input type='text' value='0'></td>]]
|
row.innerHTML = "<td><input type='text' value=''></td><td><input type='text' value=''></td><td><input type='text' value=''></td><td><input type='text' value='0'></td>]]
|
||||||
.. (function() local s = "<td" if #layout.ports <= 1 then s = s .. " style='display:none'" end s = s .. "><select>" for pos, port in ipairs(layout.ports) do s = s .. "<option value='" .. port .. "'>" .. pos .. "</option>" end return s .. "</select></td>" end)()
|
.. (function() local s = "<td" if #layout.ports <= 1 then s = s .. " style='display:none'" end s = s .. "><select>" for pos, port in ipairs(layout.ports) do s = s .. "<option value='" .. port .. "'>" .. pos .. "</option>" end return s .. "</select></td>" end)()
|
||||||
.. [[<td><button onclick='xlink_remove(this)'>-</button></td>"
|
.. [[<td><input type='hidden' value=''><button onclick='xlink_remove(this)'>-</button></td>"
|
||||||
tbody.appendChild(row)
|
tbody.appendChild(row)
|
||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
|
@ -759,7 +759,7 @@ do
|
||||||
do
|
do
|
||||||
html.print("<option value='" .. port .. "'" .. (xlink.port == port and " selected" or "") .. ">" .. pos .. "</option>")
|
html.print("<option value='" .. port .. "'" .. (xlink.port == port and " selected" or "") .. ">" .. pos .. "</option>")
|
||||||
end
|
end
|
||||||
html.print("</td></select>")
|
html.print("</select></td>")
|
||||||
html.print("<td><input type='hidden' value='" .. xlink.mac .. "'><button onclick='xlink_remove(this)'>-</button></td>")
|
html.print("<td><input type='hidden' value='" .. xlink.mac .. "'><button onclick='xlink_remove(this)'>-</button></td>")
|
||||||
html.print("</tr>")
|
html.print("</tr>")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue