Skip to content

Commit 55aceff

Browse files
committed
Convert wizard page directive
1 parent f296b72 commit 55aceff

File tree

6 files changed

+363
-426
lines changed

6 files changed

+363
-426
lines changed

src/wizard/wizard-directive.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* The basic structure should be:
1010
* <pre>
1111
* <div pf-wizard>
12-
* <div pf-wizard-step>
12+
* <pf-wizard-step>
1313
* <pf-wizard-substep><!-- content here --></pf-wizard-substep>
1414
* <pf-wizard-substep><!-- content here --></pf-wizard-substep>
15-
* </div>
16-
* <div pf-wizard-step><!-- additional configuration can be added here with substeps if desired --></div>
17-
* <div pf-wizard-step><!-- review steps and final command here --></div>
15+
* </pf-wizard-step>
16+
* <pf-wizard-step><!-- additional configuration can be added here with substeps if desired --></pf-wizard-step>
17+
* <pf-wizard-step><!-- review steps and final command here --></pf-wizard-step>
1818
* </div>
1919
* </pre>
2020
*
@@ -53,7 +53,7 @@
5353
wizard-done="deployComplete || deployInProgress"
5454
content-height="'600px'"
5555
loading-secondary-information="secondaryLoadInformation">
56-
<div pf-wizard-step step-title="First Step" substeps="true" step-id="details" step-priority="0" show-review="true" show-review-details="true">
56+
<pf-wizard-step step-title="First Step" substeps="true" step-id="details" step-priority="0" show-review="true" show-review-details="true">
5757
<div ng-include="'detail-page.html'">
5858
</div>
5959
<pf-wizard-substep step-title="Details - Extra" next-enabled="true" step-id="details-extra" step-priority="1" show-review="true" show-review-details="true" review-template="review-second-template.html">
@@ -66,8 +66,8 @@
6666
</div>
6767
</form>
6868
</pf-wizard-substep>
69-
</div>
70-
<div pf-wizard-step step-title="Second Step" substeps="false" step-id="configuration" step-priority="1" show-review="true" review-template="review-second-template.html" >
69+
</pf-wizard-step>
70+
<pf-wizard-step step-title="Second Step" substeps="false" step-id="configuration" step-priority="1" show-review="true" review-template="review-second-template.html" >
7171
<form class="form-horizontal">
7272
<h3>Wizards should make use of substeps consistently throughout (either using them or not using them). This is an example only.</h3>
7373
<div pf-form-group pf-label="Lorem">
@@ -77,11 +77,11 @@
7777
<input id="new-ipsum" name="ipsum" ng-model="data.ipsum" type="text" />
7878
</div>
7979
</form>
80-
</div>
81-
<div pf-wizard-step step-title="Review" substeps="true" step-id="review" step-priority="2">
80+
</pf-wizard-step>
81+
<pf-wizard-step step-title="Review" substeps="true" step-id="review" step-priority="2">
8282
<div ng-include="'summary.html'"></div>
8383
<div ng-include="'deployment.html'"></div>
84-
</div>
84+
</pf-wizard-step>
8585
</div>
8686
</file>
8787
<file name="detail-page.html">
@@ -519,6 +519,10 @@ angular.module('patternfly.wizard').directive('pfWizard', function ($window) {
519519
}
520520
};
521521

522+
this.setPageSelected = function (step) {
523+
$scope.$emit('wizard:stepChanged', {step: step, index: stepIdx( step )});
524+
};
525+
522526
this.addStep = function (step) {
523527
// Insert the step into step array
524528
var insertBefore = _.find($scope.steps, function (nextStep) {

0 commit comments

Comments
 (0)