|
|
|
@ -2,7 +2,7 @@ from lib.snabbdom import h, patch
|
|
|
|
|
from message import *
|
|
|
|
|
import random
|
|
|
|
|
from view.utils import *
|
|
|
|
|
from model import Translation, Sense
|
|
|
|
|
from model import Translation, Sense, Example
|
|
|
|
|
|
|
|
|
|
from export import export_to_xml
|
|
|
|
|
|
|
|
|
@ -98,7 +98,7 @@ class View:
|
|
|
|
|
example_tag += ".example-chosen"
|
|
|
|
|
|
|
|
|
|
return h("div.example", {}, [
|
|
|
|
|
h("div.example-dot", {}, "▣"),
|
|
|
|
|
h("div.example-dot", {"on": {"click": msg(ShowExampleMenu(example))} }, "▣"),
|
|
|
|
|
h(example_tag, {"on": {"click": msg(ShowExampleEdit(example))} }, [
|
|
|
|
|
h("span.example-text", {}, example.text),
|
|
|
|
|
h("div.example-translation-list", {}, [
|
|
|
|
@ -161,6 +161,12 @@ class View:
|
|
|
|
|
h("button.shyButton", { "on": {"click": msg(SenseMoveUp(sense))}}, "↑"),
|
|
|
|
|
h("button.shyButton", { "on": {"click": msg(SenseMoveDown(sense))}}, "↓"),
|
|
|
|
|
h("button.shyButton", { "on": {"click": msg(SenseBin(sense))}}, "🗑")])
|
|
|
|
|
|
|
|
|
|
elif type(menu_target) is Example:
|
|
|
|
|
return h("span.popup-menu", { "style": style }, [
|
|
|
|
|
h("button.shyButton", {}, "a"),
|
|
|
|
|
h("button.shyButton", {}, "b"),
|
|
|
|
|
h("button.shyButton", {}, "🗑")])
|
|
|
|
|
else:
|
|
|
|
|
console.log("Should not be heree!!")
|
|
|
|
|
|
|
|
|
|