|
1 | | -function wizardButtonDirective (action) { |
| 1 | +(function () { |
2 | 2 | 'use strict'; |
3 | | - |
4 | | - angular.module('patternfly.wizard') |
5 | | - .directive(action, function () { |
6 | | - return { |
7 | | - restrict: 'A', |
8 | | - require: '^pf-wizard', |
9 | | - scope: { |
10 | | - callback: "=?" |
11 | | - }, |
12 | | - link: function ($scope, $element, $attrs, wizard) { |
13 | | - $element.on("click", function (e) { |
14 | | - e.preventDefault(); |
15 | | - $scope.$apply(function () { |
16 | | - // scope apply in button module |
17 | | - $scope.$eval($attrs[action]); |
18 | | - wizard[action.replace("pfWiz", "").toLowerCase()]($scope.callback); |
| 3 | + function wizardButtonDirective (action) { |
| 4 | + angular.module('patternfly.wizard') |
| 5 | + .directive(action, function () { |
| 6 | + return { |
| 7 | + restrict: 'A', |
| 8 | + require: '^pf-wizard', |
| 9 | + scope: { |
| 10 | + callback: "=?" |
| 11 | + }, |
| 12 | + link: function ($scope, $element, $attrs, wizard) { |
| 13 | + $element.on("click", function (e) { |
| 14 | + e.preventDefault(); |
| 15 | + $scope.$apply(function () { |
| 16 | + // scope apply in button module |
| 17 | + $scope.$eval($attrs[action]); |
| 18 | + wizard[action.replace("pfWiz", "").toLowerCase()]($scope.callback); |
| 19 | + }); |
19 | 20 | }); |
20 | | - }); |
21 | | - } |
22 | | - }; |
23 | | - }); |
24 | | -} |
| 21 | + } |
| 22 | + }; |
| 23 | + }); |
| 24 | + } |
25 | 25 |
|
26 | | -wizardButtonDirective('pfWizNext'); |
27 | | -wizardButtonDirective('pfWizPrevious'); |
28 | | -wizardButtonDirective('pfWizFinish'); |
29 | | -wizardButtonDirective('pfWizCancel'); |
30 | | -wizardButtonDirective('pfWizReset'); |
| 26 | + wizardButtonDirective('pfWizNext'); |
| 27 | + wizardButtonDirective('pfWizPrevious'); |
| 28 | + wizardButtonDirective('pfWizFinish'); |
| 29 | + wizardButtonDirective('pfWizCancel'); |
| 30 | + wizardButtonDirective('pfWizReset'); |
| 31 | +})(); |
0 commit comments