|
|
|
@ -47,8 +47,19 @@ def generic_list_editor(title, element_list_getter):
|
|
|
|
|
content.append(h("button", {"on": {"click": message.msg(message.AddToGenericList, element_list_getter)}}, "+"))
|
|
|
|
|
return content
|
|
|
|
|
|
|
|
|
|
def homonymy_editor(title, current_labels):
|
|
|
|
|
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}}, ""))
|
|
|
|
|
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), {}, [
|
|
|
|
|