export multiword example as new entry
This commit is contained in:
@@ -98,11 +98,16 @@ class View:
|
||||
elif type(menu_target) is Example:
|
||||
example = menu_target
|
||||
sense = example_sense(example, entry)
|
||||
return h("span.popup-menu", { "style": style }, [
|
||||
dom_children = [
|
||||
h("button.shyButton", { "on": {"click": msg(ShowExampleEdit, example, sense)}}, "✎"),
|
||||
h("button.shyButton", { "on": {"click": msg(ExampleMoveUp, example)}}, "↑"),
|
||||
h("button.shyButton", { "on": {"click": msg(ExampleMoveDown, example)}}, "↓"),
|
||||
h("button.shyButton", { "on": {"click": msg(ExampleBin, example)}}, "🗑")])
|
||||
h("button.shyButton", { "on": {"click": msg(ExampleBin, example)}}, "🗑")]
|
||||
|
||||
if example.is_multiword():
|
||||
dom_children.insert(1, h("button.shyButton", { "on": {"click": msg(ExampleAsNewEntry, example, sense)}}, "As new Entry"))
|
||||
|
||||
return h("span.popup-menu", { "style": style }, dom_children)
|
||||
else:
|
||||
console.log("Should not be heree!!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user