From d8d1ac232661deb7f44892e811bc980812e07cb5 Mon Sep 17 00:00:00 2001 From: Arthur TRESSOL Date: Thu, 13 Sep 2018 16:28:08 -0400 Subject: [PATCH] Fixed linear issue. With editable button --- caribou-step.html | 14 +++++++++----- caribou-stepper.html | 2 +- demo/index.html | 6 +++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/caribou-step.html b/caribou-step.html index e129488..3b0bb63 100644 --- a/caribou-step.html +++ b/caribou-step.html @@ -158,8 +158,9 @@
- +
@@ -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) diff --git a/caribou-stepper.html b/caribou-stepper.html index fac15a0..a338375 100644 --- a/caribou-stepper.html +++ b/caribou-stepper.html @@ -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: diff --git a/demo/index.html b/demo/index.html index 8f5dc05..3dfbb8c 100644 --- a/demo/index.html +++ b/demo/index.html @@ -111,14 +111,14 @@

Step with back and skip button

The name of the button can be changed by stepper.