definitionList UI support

This commit is contained in:
matic_t 2020-10-30 05:39:54 -07:00
parent 30d0709781
commit 30cad4ab23
2 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,7 @@ def generic_key_value_editor(title, element_list_getter, key, value = "value"):
content.append(h("button", {"on": {"click": message.msg(message.AddToGenericList, element_list_getter)}}, "+")) content.append(h("button", {"on": {"click": message.msg(message.AddToGenericList, element_list_getter)}}, "+"))
return content return content
def sense_definitions_editor(title, type_value, explanation_value): def sense_definitions_editor(type_value, explanation_value):
type_props = {"value": type_value, "type": "text"} type_props = {"value": type_value, "type": "text"}
explanation_props = {"value": explanation_value, "type": "text"} explanation_props = {"value": explanation_value, "type": "text"}
return [ return [

View File

@ -135,6 +135,7 @@ def edit_sense_definition(sense):
explanation = x.value explanation = x.value
if indicator is not "": if indicator is not "":
break break
content = sense_definitions_editor(indicator, explanation) content = sense_definitions_editor(indicator, explanation)
return modal_template(content, "Definicije pomena", (message.EditSenseDefinition, sense)) return modal_template(content, "Definicije pomena", (message.EditSenseDefinition, sense))