|
78 | 78 | </form>
|
79 | 79 | </pf-wizard-substep>
|
80 | 80 | </pf-wizard-step>
|
81 |
| - <pf-wizard-step step-title="Second Step" next-tooltip="secondStepNextTooltip" prev-tooltip="secondStepPrevTooltip" substeps="false" step-id="configuration" step-priority="1" show-review="true" review-template="review-second-template.html" > |
82 |
| - <form class="form-horizontal"> |
83 |
| - <h3>Wizards should make use of substeps consistently throughout (either using them or not using them). This is an example only.</h3> |
84 |
| - <pf-form-group pf-label="Lorem" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" > |
85 |
| - <input id="new-lorem" name="lorem" ng-model="data.lorem" type="text"/> |
86 |
| - </pf-form-group> |
87 |
| - <pf-form-group pf-label="Ipsum" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" > |
88 |
| - <input id="new-ipsum" name="ipsum" ng-model="data.ipsum" type="text" /> |
89 |
| - </pf-form-group> |
90 |
| - </form> |
91 |
| - </pf-wizard-step> |
| 81 | + <div ng-include="'second-step.html'"> |
| 82 | + </div> |
92 | 83 | <pf-wizard-step step-title="Review" next-tooltip="reviewStepNextTooltip" prev-tooltip="reviewStepPrevTooltip" substeps="true" step-id="review" step-priority="2">
|
93 | 84 | <div ng-include="'summary.html'"></div>
|
94 | 85 | <div ng-include="'deployment.html'"></div>
|
|
97 | 88 | </file>
|
98 | 89 | <file name="detail-page.html">
|
99 | 90 | <div ng-controller="DetailsGeneralController">
|
100 |
| - <pf-wizard-substep step-title="General" next-enabled="detailsGeneralComplete" step-id="details-general" step-priority="0" on-show="onShow" review-template="{{reviewTemplate}}" show-review-details="true"> |
| 91 | + <pf-wizard-substep step-title="General" |
| 92 | + next-enabled="detailsGeneralComplete" |
| 93 | + step-id="details-general" |
| 94 | + step-priority="0" |
| 95 | + on-show="onShow" |
| 96 | + focus-selectors="focusSelectors" |
| 97 | + review-template="{{reviewTemplate}}" |
| 98 | + show-review-details="true"> |
101 | 99 | <form class="form-horizontal">
|
102 | 100 | <pf-form-group pf-label="Name" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" required>
|
103 | 101 | <input id="new-name" name="name" ng-model="data.name" type="text" ng-change="updateName()" required/>
|
|
137 | 135 | </form>
|
138 | 136 | </div>
|
139 | 137 | </file>
|
| 138 | + <file name="second-step.html"> |
| 139 | + <div ng-controller="SecondStepController"> |
| 140 | + <pf-wizard-step focus-selectors="focusSelectors" step-title="Second Step" next-tooltip="secondStepNextTooltip" prev-tooltip="secondStepPrevTooltip" substeps="false" step-id="configuration" step-priority="1" show-review="true" review-template="review-second-template.html" > |
| 141 | + <form class="form-horizontal"> |
| 142 | + <h3>Wizards should make use of substeps consistently throughout (either using them or not using them). This is an example only.</h3> |
| 143 | + <pf-form-group pf-label="Lorem" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" > |
| 144 | + <input id="step-two-new-lorem" name="lorem" ng-model="data.lorem" type="text"/> |
| 145 | + </pf-form-group> |
| 146 | + <pf-form-group pf-label="Ipsum" pf-label-class="col-sm-3 col-md-2" pf-input-class="col-sm-9 col-md-10" > |
| 147 | + <input id="step-two-new-ipsum" name="ipsum" ng-model="data.ipsum" type="text" /> |
| 148 | + </pf-form-group> |
| 149 | + </form> |
| 150 | + </pf-wizard-step> |
| 151 | + </div> |
| 152 | + </file> |
140 | 153 | <file name="summary.html">
|
141 | 154 | <div ng-controller="SummaryController">
|
142 | 155 | <pf-wizard-substep step-title="Summary" step-id="review-summary" step-priority="0" next-enabled="true" prev-enabled="true" ok-to-nav-away="true" wz-disabled="false" on-show="onShow">
|
|
262 | 275 |
|
263 | 276 | $scope.reviewTemplate = "review-template.html";
|
264 | 277 | $scope.detailsGeneralComplete = false;
|
265 |
| -
|
| 278 | + $scope.focusSelectors = ['#new-name']; |
266 | 279 | $scope.onShow = function() { };
|
267 | 280 |
|
268 | 281 | $scope.updateName = function() {
|
|
288 | 301 | }
|
289 | 302 | ]);
|
290 | 303 |
|
| 304 | + angular.module('patternfly.wizard').controller('SecondStepController', ['$rootScope', '$scope', |
| 305 | + function ($rootScope, $scope) { |
| 306 | + 'use strict'; |
| 307 | +
|
| 308 | + $scope.focusSelectors = ['.invalid-classname', '#step-two-new-lorem']; |
| 309 | + } |
| 310 | + ]); |
| 311 | +
|
291 | 312 | angular.module('patternfly.wizard').controller('SummaryController', ['$rootScope', '$scope', '$timeout',
|
292 | 313 | function ($rootScope, $scope, $timeout) {
|
293 | 314 | 'use strict';
|
|
0 commit comments