multiword example should not have role="none" components

This commit is contained in:
Ozbolt Menegatti 2020-06-11 19:52:57 +02:00
parent 4cc3c2cdc6
commit fcd6f158a1

View File

@ -54,17 +54,16 @@ def edit_example(example, sense):
h("span.example-component-button.example-component-collocate", h("span.example-component-button.example-component-collocate",
{"on": {"click": role_msg(idx, "collocate")}}, "C"), {"on": {"click": role_msg(idx, "collocate")}}, "C"),
h("span.example-component-button.example-component-other", h("span.example-component-button.example-component-other",
{"on": {"click": role_msg(idx, "other")}}, "O"), {"on": {"click": role_msg(idx, "other")}}, "O")]
h("span.example-component-button.example-component-none",
{"on": {"click": role_msg(idx, "none")}}, "N")]
if example.is_multiword(): if example.is_multiword():
additional_class = ".example-component-no-space" if component.no_space else "" additional_class = ".example-component-no-space" if component.no_space else ""
click_message = message.msg(message.ExampleComponentSpace, example_original, idx)
result.append(h("span.example-component-button" + additional_class, result.append(h("span.example-component-button" + additional_class,
{"on": {"on": {"click": click_message }}, ""))
{"click": else:
message.msg(message.ExampleComponentSpace, example_original, idx)}}, result.append(h("span.example-component-button.example-component-none",
"")) {"on": {"click": role_msg(idx, "none")}}, "N"))
result.extend([ result.extend([
h("span.example-component-button", h("span.example-component-button",