Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Firefox doesn't give you access to event
globally in ember actions.
Dieser Commit ist enthalten in:
Ursprung
62b4cfbb21
Commit
68b6e34b55
2 geänderte Dateien mit 59 neuen und 6 gelöschten Zeilen
|
@ -70,12 +70,12 @@ export default {
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
quit() {
|
quit() {
|
||||||
if ($(event.target).hasClass('quit')) {
|
|
||||||
this.get('wizard').skip();
|
this.get('wizard').skip();
|
||||||
} else {
|
},
|
||||||
|
|
||||||
|
done() {
|
||||||
this.set('finalStep', true);
|
this.set('finalStep', true);
|
||||||
this.send('nextStep');
|
this.send('nextStep');
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
showMessage(message) {
|
showMessage(message) {
|
||||||
|
|
53
assets/javascripts/wizard/templates/components/wizard-step.hbs
Normale Datei
53
assets/javascripts/wizard/templates/components/wizard-step.hbs
Normale Datei
|
@ -0,0 +1,53 @@
|
||||||
|
<div class='wizard-step-contents'>
|
||||||
|
{{#if step.title}}
|
||||||
|
<h1 class='wizard-step-title'>{{step.title}}</h1>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if bannerImage}}
|
||||||
|
<img src={{bannerImage}} class="wizard-step-banner">
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if step.description}}
|
||||||
|
<p class='wizard-step-description'>{{{step.description}}}</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#wizard-step-form step=step}}
|
||||||
|
{{#each step.fields as |field|}}
|
||||||
|
{{wizard-field field=field step=step wizard=wizard}}
|
||||||
|
{{/each}}
|
||||||
|
{{/wizard-step-form}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='wizard-step-footer'>
|
||||||
|
|
||||||
|
<div class='wizard-progress'>
|
||||||
|
<div class='white'></div>
|
||||||
|
<div class='black' style={{barStyle}}></div>
|
||||||
|
<div class='screen'></div>
|
||||||
|
<span>{{bound-i18n "wizard.step" current=step.displayIndex total=wizard.totalSteps}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='wizard-buttons'>
|
||||||
|
{{#if showQuitButton}}
|
||||||
|
<a href {{action "quit"}} class='action-link quit' tabindex="11">{{i18n "wizard.quit"}}</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if showBackButton}}
|
||||||
|
<a href {{action "backStep"}} class='action-link back' tabindex="11">{{i18n "wizard.back"}}</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if showNextButton}}
|
||||||
|
<button class='wizard-btn next primary' {{action "nextStep"}} disabled={{saving}} tabindex="10">
|
||||||
|
{{i18n "wizard.next"}}
|
||||||
|
{{d-icon "chevron-right"}}
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if showDoneButton}}
|
||||||
|
<button class='wizard-btn done' {{action "done"}} disabled={{saving}} tabindex="10">
|
||||||
|
{{i18n "wizard.done"}}
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
Laden …
In neuem Issue referenzieren