Fixed display for explanation
This commit is contained in:
parent
d93d42bf4d
commit
9accecc554
|
@ -45,19 +45,13 @@ class Sense(Data):
|
||||||
if explanation is None and x["type"] == "explanation":
|
if explanation is None and x["type"] == "explanation":
|
||||||
explanation = x.value
|
explanation = x.value
|
||||||
|
|
||||||
if indicator:
|
|
||||||
definition = indicator
|
|
||||||
if explanation:
|
|
||||||
definition += ", " + explanation
|
|
||||||
else:
|
|
||||||
definition = explanation
|
|
||||||
|
|
||||||
result = h("div.elm-div", {}, [
|
result = h("div.elm-div", {}, [
|
||||||
h("div.sense-num", {"on": {"click": M.msg(M.ShowSenseMenu, self)}}, str(sense_num + 1)),
|
h("div.sense-num", {"on": {"click": M.msg(M.ShowSenseMenu, self)}}, str(sense_num + 1)),
|
||||||
h("div.sense", {}, [
|
h("div.sense", {}, [
|
||||||
h("span.sense-label-list", { "on": { "click": M.msg(M.ShowSenseLabelEdit, self) }}, [
|
h("span.sense-label-list", { "on": { "click": M.msg(M.ShowSenseLabelEdit, self) }}, [
|
||||||
h("span.sense-label", {}, clean_label(slabel)) for _, slabel in self.labels ]),
|
h("span.sense-label", {}, clean_label(slabel)) for _, slabel in self.labels ]),
|
||||||
h("span.sense-definition", { "on": { "click": M.msg(M.ShowSenseDefinitionEdit, self) }}, definition),
|
h("span.sense-definition", { "on": { "click": M.msg(M.ShowSenseDefinitionEdit, self) }}, indicator),
|
||||||
|
h("div", {}, "Razlaga: " + explanation) if explanation else None,
|
||||||
h("div", {}, View.view_translations(self.translations, self, model)),
|
h("div", {}, View.view_translations(self.translations, self, model)),
|
||||||
h("div", {}, examples)])])
|
h("div", {}, examples)])])
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in New Issue
Block a user