Skip to content

fix(wizard): update wizard on parameter changes #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/wizard/examples/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</file>
<file name="wizard-container.html">
<pf-wizard wizard-title="Wizard Title"
wizard-ready="deployProviderReady"
wizard-ready="wizardReady"
on-finish="finishedWizard()"
on-cancel="cancelDeploymentWizard()"
next-title="nextButtonTitle"
Expand Down Expand Up @@ -199,9 +199,12 @@
ipsum: ''
};
$scope.secondaryLoadInformation = 'ipsum dolor sit amet, porta at suspendisse ac, ut wisi vivamus, lorem sociosqu eget nunc amet.';

$scope.wizardReady = false;
$timeout(function () {
$scope.deployReady = true;
$scope.wizardReady = true;
}, 1000);

$scope.nextButtonTitle = "Next >";
};

Expand Down
26 changes: 14 additions & 12 deletions src/wizard/wizard.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ angular.module('patternfly.wizard').component('pfWizard', {
bindings: {
title: '@',
wizardTitle: '@',
hideIndicators: '=?',
hideIndicators: '<?',
activeStepTitleOnly: '<?',
hideSidebar: '@',
hideHeader: '@',
hideBackButton: '@',
sidebarClass: '@',
stepClass: '@',
contentHeight: '=?',
contentHeight: '<?',
currentStep: '<?',
cancelTitle: '=?',
backTitle: '=?',
nextTitle: '=?',
backCallback: '=?',
nextCallback: '=?',
cancelTitle: '<?',
backTitle: '<?',
nextTitle: '<?',
backCallback: '<?',
nextCallback: '<?',
onFinish: '&',
onCancel: '&',
wizardReady: '=?',
wizardDone: '=?',
loadingWizardTitle: '=?',
loadingSecondaryInformation: '=?',
embedInPage: '=?',
wizardReady: '<?',
wizardDone: '<?',
Copy link
Member

@cdcabrera cdcabrera Dec 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wizardReady and wizardDone do their status need to be piped back out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, these are just to inform the wizard of the app's status.

loadingWizardTitle: '<?',
loadingSecondaryInformation: '<?',
embedInPage: '<?',
onStepChanged: '&?'
},
templateUrl: 'wizard/wizard.html',
Expand Down Expand Up @@ -208,13 +208,15 @@ angular.module('patternfly.wizard').component('pfWizard', {
ctrl.allowStepIndicatorClick = function (step) {
return step.allowClickNav &&
!ctrl.wizardDone &&
ctrl.selectedStep &&
ctrl.selectedStep.okToNavAway &&
(ctrl.selectedStep.nextEnabled || (step.stepPriority < ctrl.selectedStep.stepPriority)) &&
(ctrl.selectedStep.prevEnabled || (step.stepPriority > ctrl.selectedStep.stepPriority));
};

ctrl.stepClick = function (step) {
if (step.allowClickNav &&
ctrl.selectedStep &&
!ctrl.wizardDone &&
ctrl.selectedStep.okToNavAway &&
(ctrl.selectedStep.nextEnabled || (step.stepPriority < ctrl.selectedStep.stepPriority)) &&
Expand Down