mt-additional-xml-shema-support #5

Merged
matic_t merged 11 commits from mt-additional-xml-shema-support into master 2020-08-05 10:04:55 +00:00
Showing only changes of commit fb9a809c02 - Show all commits

View File

@ -48,11 +48,22 @@ def generic_list_editor(title, element_list_getter):
return content
def homonymy_editor(title, current_labels):
def split_line2(left, right):
cls = "flex.two{}".format(".label-list-row")
return h("div.{}".format(cls), {}, [
h("span.half", {}, left), h("span.half", {}, right)])
content = [h("p", {}, title)]
for i, feature in enumerate(current_labels()):
console.log(feature)
content.append(h("label", {"props": {"value": "Name", "for": i}}))
content.append(h("input.list-adder-input", {"props": {"type": "text", "value": feature["name"], "id": i}}, ""))
console.log(feature["name"])
name = [h("div", {})]
value = [h("div", {})]
name.append(h("label", {"attrs": {"for": i}}, "Name:"))
name.append(h("input.list-adder-input", {"props": {"type": "text", "value": feature["name"], "id": i}}, ""))
value.append(h("label", {"attrs": {"for": i + "-value"}}, "Value:"))
value.append(h("input.list-adder-input", {"props": {"type": "text", "value": feature["value"], "id": i + "-value"}}, ""))
content.append(split_line2(name, value))
content.append(h("button", {"on": {"click": message.msg(message.AddToGenericList, current_labels)}}, "+"))
return content