Revert "DEV: Remove usage of {{action}} modifiers (#18333)" (#18469)

This reverts commit ba27ee1637.

We found some issues with handling of cmd/ctrl/shift + click on `<a` elements
This commit is contained in:
David Taylor
2022-10-04 12:27:26 +01:00
committed by GitHub
parent ba27ee1637
commit 585c584fdb
135 changed files with 730 additions and 929 deletions
@@ -398,10 +398,4 @@ export default Controller.extend(ModalFunctionality, {
removeOption(option) {
this.pollOptions.removeObject(option);
},
@action
updatePollType(pollType, event) {
event?.preventDefault();
this.pollType = pollType;
},
});
@@ -1,15 +1,15 @@
<DModalBody @title="poll.ui_builder.title" @class="poll-ui-builder">
<div class="input-group poll-type">
<a href {{on "click" (fn this.updatePollType "regular")}} class="poll-type-value {{if this.isRegular "active"}}">
<a href {{action (mut this.pollType) "regular"}} class="poll-type-value {{if this.isRegular "active"}}">
{{i18n "poll.ui_builder.poll_type.regular"}}
</a>
<a href {{on "click" (fn this.updatePollType "multiple")}} class="poll-type-value {{if this.isMultiple "active"}}">
<a href {{action (mut this.pollType) "multiple"}} class="poll-type-value {{if this.isMultiple "active"}}">
{{i18n "poll.ui_builder.poll_type.multiple"}}
</a>
{{#if this.showNumber}}
<a href {{on "click" (fn this.updatePollType "number")}} class="poll-type-value {{if this.isNumber "active"}}">
<a href {{action (mut this.pollType) "number"}} class="poll-type-value {{if this.isNumber "active"}}">
{{i18n "poll.ui_builder.poll_type.number"}}
</a>
{{/if}}