From 68b6e34b5580397c00ab03512541d52ee94d2f1d Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 3 Nov 2017 21:24:09 +0800 Subject: [PATCH] Firefox doesn't give you access to `event` globally in ember actions. --- .../wizard/initializers/custom.js.es6 | 12 ++--- .../templates/components/wizard-step.hbs | 53 +++++++++++++++++++ 2 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 assets/javascripts/wizard/templates/components/wizard-step.hbs diff --git a/assets/javascripts/wizard/initializers/custom.js.es6 b/assets/javascripts/wizard/initializers/custom.js.es6 index d1978ee6..6263f8b0 100644 --- a/assets/javascripts/wizard/initializers/custom.js.es6 +++ b/assets/javascripts/wizard/initializers/custom.js.es6 @@ -70,12 +70,12 @@ export default { actions: { quit() { - if ($(event.target).hasClass('quit')) { - this.get('wizard').skip(); - } else { - this.set('finalStep', true); - this.send('nextStep'); - }; + this.get('wizard').skip(); + }, + + done() { + this.set('finalStep', true); + this.send('nextStep'); }, showMessage(message) { diff --git a/assets/javascripts/wizard/templates/components/wizard-step.hbs b/assets/javascripts/wizard/templates/components/wizard-step.hbs new file mode 100644 index 00000000..746fdc6c --- /dev/null +++ b/assets/javascripts/wizard/templates/components/wizard-step.hbs @@ -0,0 +1,53 @@ +
+ {{#if step.title}} +

{{step.title}}

+ {{/if}} + + {{#if bannerImage}} + + {{/if}} + + {{#if step.description}} +

{{{step.description}}}

+ {{/if}} + + {{#wizard-step-form step=step}} + {{#each step.fields as |field|}} + {{wizard-field field=field step=step wizard=wizard}} + {{/each}} + {{/wizard-step-form}} +
+ +