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

View File

@@ -205,14 +205,12 @@ export default createPreviewComponent(628, 322, {
},
@action
setPreviewHomepage(event) {
event?.preventDefault();
setPreviewHomepage() {
this.set("previewTopic", false);
},
@action
setPreviewTopic(event) {
event?.preventDefault();
setPreviewTopic() {
this.set("previewTopic", true);
},
});

View File

@@ -134,14 +134,12 @@ export default Component.extend({
},
@action
quit(event) {
event?.preventDefault();
quit() {
this.router.transitionTo("discovery.latest");
},
@action
exitEarly(event) {
event?.preventDefault();
exitEarly() {
const step = this.step;
step.validate();
@@ -158,9 +156,7 @@ export default Component.extend({
},
@action
backStep(event) {
event?.preventDefault();
backStep() {
if (this.saving) {
return;
}
@@ -169,9 +165,7 @@ export default Component.extend({
},
@action
nextStep(event) {
event?.preventDefault();
nextStep() {
if (this.saving) {
return;
}

View File

@@ -9,10 +9,10 @@
</div>
<div class="preview-nav">
<a href class="preview-nav-button {{if this.previewTopic "active"}}" {{on "click" this.setPreviewTopic}}>
<a href class="preview-nav-button {{if this.previewTopic "active"}}" {{action "setPreviewTopic"}}>
{{i18n "wizard.previews.topic_preview"}}
</a>
<a href class="preview-nav-button {{unless this.previewTopic "active"}}" {{on "click" this.setPreviewHomepage}}>
<a href class="preview-nav-button {{unless this.previewTopic "active"}}" {{action "setPreviewHomepage"}}>
{{i18n "wizard.previews.homepage_preview"}}
</a>
</div>

View File

@@ -49,31 +49,31 @@
<div class="wizard-container__buttons">
{{#if this.showNextButton}}
<button {{on "click" this.nextStep}} disabled={{this.saving}} type="button" class="wizard-container__button primary {{this.nextButtonClass}}">
<button {{action "nextStep"}} disabled={{this.saving}} type="button" class="wizard-container__button primary {{this.nextButtonClass}}">
{{i18n this.nextButtonLabel}}
</button>
{{/if}}
{{#if this.showFinishButton}}
<button {{on "click" this.exitEarly}} disabled={{this.saving}} type="button" class="wizard-container__button jump-in">
<button {{action "exitEarly"}} disabled={{this.saving}} type="button" class="wizard-container__button jump-in">
{{i18n "wizard.jump_in"}}
</button>
{{/if}}
{{#if this.showJumpInButton}}
<button {{on "click" this.quit}} disabled={{this.saving}} type="button" class="wizard-container__button {{this.jumpInButtonClass}}">
<button {{action "quit"}} disabled={{this.saving}} type="button" class="wizard-container__button {{this.jumpInButtonClass}}">
{{i18n this.jumpInButtonLabel}}
</button>
{{/if}}
</div>
<div class="wizard-container__step-progress">
<a href {{on "click" this.backStep}} class="wizard-container__link back {{unless this.showBackButton "inactive"}}">{{d-icon "chevron-left"}}</a>
<a href {{action "backStep"}} class="wizard-container__link back {{unless this.showBackButton "inactive"}}">{{d-icon "chevron-left"}}</a>
<span class="wizard-container__step-text">{{bound-i18n "wizard.step-text"}}</span>
<span class="wizard-container__step-count">{{bound-i18n "wizard.step" current=this.step.displayIndex total=this.wizard.totalSteps}}</span>
<a href {{on "click" this.nextStep}} class="wizard-container__link {{unless this.showNextButton "inactive"}}">{{d-icon "chevron-right"}}</a>
<a href {{action "nextStep"}} class="wizard-container__link {{unless this.showNextButton "inactive"}}">{{d-icon "chevron-right"}}</a>
</div>