Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur TRESSOL committed Sep 13, 2018
2 parents 07307a5 + d8d1ac2 commit 972fbce
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 9 additions & 5 deletions caribou-step.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@
<div class="layout">
<iron-collapse id="stepContent" opened="{{active}}" horizontal$="{{stepperHorizontal}}">
<slot></slot>
<caribou-step-action-buttons id="stepButtons" continue-label="[[continueLabel]]" finish-label="[[finishLabel]]" update-label="[[updateLabel]]"
skip-label="[[skipLabel]]" skip-button="[[skipButton]]" back-label="[[backLabel]]" back-button="[[backButton]]"></caribou-step-action-buttons>
<caribou-step-action-buttons id="stepButtons" continue-label="[[continueLabel]]" finish-label="[[finishLabel]]"
update-label="[[updateLabel]]" skip-label="[[skipLabel]]" skip-button="[[skipButton]]" back-label="[[backLabel]]"
back-button="[[backButton]]"></caribou-step-action-buttons>
</iron-collapse>
</div>
</template>
Expand Down Expand Up @@ -355,9 +356,12 @@
* @private
*/
_toggle() {
if (!this.parentElement.finish && (!this.parentElement.linear && (!this.save || this.editable)) ||
(this.parentElement.linear &&
this.editable)) {
if (!this.parentElement.finish &&
((!this.parentElement.linear && (!this.save || this.editable)) ||
(this.parentElement.linear && this.save && this.editable || this.parentElement.activeStep
.save &&
(this.parentElement.previousStep !== null && this.parentElement.previousStep.save))
)) {
this.parentElement.__closeAllStep(this);
this.toggleStep();
if (this.save && this.editable)
Expand Down
2 changes: 1 addition & 1 deletion caribou-stepper.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* - linear : this require users to complete one step in order to move on to the next.
* If linear is false, it allow users to enter a multi-step flow at any point.
* - Mobile : TODO - This is used when there is multitude of step on a mobile view we will compact it.
* - Horizontal (TODO): True if you want to use the stepper horizontaly. Otherwise (default) it's vertical.
* - Horizontal : True if you want to use the stepper horizontaly. Otherwise (default) it's vertical.
* - OpenFirstStepOnStartup : If true, the first step will be open after load time.
*
* Example:
Expand Down
6 changes: 3 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ <h3>Step with back and skip button</h3>
<p>The name of the button can be changed by stepper.</p>
<demo-snippet>
<template>
<caribou-stepper id="stepper3">
<caribou-step id="stepper3step1" label="Step 1">
<caribou-stepper id="stepper3" linear open-first-step-on-startup>
<caribou-step id="stepper3step1" label="Step 1" editable>
<h1>Content 1</h1>
</caribou-step>
<caribou-step id="stepper3step2" label="Step 2" skip-button back-button>
<h1>Content 2</h1>
</caribou-step>
<caribou-step id="stepper3step3" label="Step 3" back-button>
<caribou-step id="stepper3step3" label="Step 3" back-button editable>
<h1>Content 3</h1>
</caribou-step>
</caribou-stepper>
Expand Down

0 comments on commit 972fbce

Please sign in to comment.