Fixed display for explanation - v4.1 #14

Merged
matic_t merged 1 commits from mt-definition-list-ui into master 2020-12-05 14:48:39 +00:00

View File

@ -45,19 +45,13 @@ class Sense(Data):
if explanation is None and x["type"] == "explanation":
explanation = x.value
if indicator:
definition = indicator
if explanation:
definition += ", " + explanation
else:
definition = explanation
result = h("div.elm-div", {}, [
h("div.sense-num", {"on": {"click": M.msg(M.ShowSenseMenu, self)}}, str(sense_num + 1)),
h("div.sense", {}, [
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-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", {}, examples)])])
return result