adding of multiword examples, still some cleanup to do.

This commit is contained in:
2020-06-11 22:34:04 +02:00
parent fcd6f158a1
commit 887eb37d20
8 changed files with 56 additions and 7 deletions

View File

@@ -89,7 +89,8 @@ def edit_example(example, sense):
h("div.three-fifth", {}, middle),
h("div.one-fifth", {}, list_of_right_buttons(idx, component))]))
return modal_template(divs, "Edit Example", (message.EditExampleText, example_original))
return modal_template(divs, "Edit Example",
(message.EditExampleText, example_original, sense))
def edit_variants(entry):

View File

@@ -92,6 +92,7 @@ class View:
return h("span.popup-menu", { "style": style }, [
h("button.shyButton", { "on": {"click": msg(SenseMoveUp, sense)}}, ""),
h("button.shyButton", { "on": {"click": msg(SenseMoveDown, sense)}}, ""),
h("button.shyButton", { "on": {"click": msg(AddMultiwordExample, sense)}}, "+"),
h("button.shyButton", { "on": {"click": msg(SenseBin, sense)}}, "🗑")])
elif type(menu_target) is Example: