fixed id=null and moving collocations between senses
This commit is contained in:
@@ -185,12 +185,14 @@ def move_examples_to_sense(example_list, entry):
|
||||
sense_of_first_example = example_senses[0]
|
||||
|
||||
options = [h("p", {}, "Choose sense for examples")]
|
||||
definition = ""
|
||||
for x in sense.definitions:
|
||||
if x["type"] == "indicator":
|
||||
definition = x.value
|
||||
break
|
||||
|
||||
for idx, sense in enumerate(entry.senses):
|
||||
definition = sense.definitions[0].value
|
||||
for x in sense.definitions:
|
||||
if x["type"] == "indicator":
|
||||
definition = x.value
|
||||
break
|
||||
|
||||
text = "{}: {}".format(idx + 1, definition)
|
||||
id_ = "choose-example-{}".format(idx)
|
||||
|
||||
@@ -201,7 +203,6 @@ def move_examples_to_sense(example_list, entry):
|
||||
options.append(h("input#{}.checkable-input".format(id_), {"props": props}, []))
|
||||
options.append(h("label.checkable", {"attrs": {"for": id_}}, text))
|
||||
options.append(h("br", {}, []))
|
||||
|
||||
return modal_template(options, "Examples picker", (message.MoveExamplesToSense, example_list))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user