|
|
@ -51,26 +51,22 @@ 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)]) |
|
|
|
h("div.half", {}, left), h("div.half", {}, right)]) |
|
|
|
|
|
|
|
content = [h("p", {}, title)] |
|
|
|
for i, feature in enumerate(current_labels()): |
|
|
|
console.log(feature) |
|
|
|
console.log(feature["name"]) |
|
|
|
name = [h("div", {})] |
|
|
|
value = [h("div", {})] |
|
|
|
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}}, "")) |
|
|
|
name.append(h("input.name-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"}}, "")) |
|
|
|
value.append(h("input.value-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 |
|
|
|
|
|
|
|
def label_list_editor(current_labels, add_label_message_class): |
|
|
|
console.log(current_labels) |
|
|
|
console.log(add_label_message_class) |
|
|
|
def split_line3(left, center, right, is_llr=True): |
|
|
|
cls = "flex.three{}".format(".label-list-row" if is_llr else "") |
|
|
|
return h("div.{}".format(cls), {}, [ |
|
|
|