diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-21 12:49:18 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-21 12:49:18 -0400 |
| commit | b28028ac4082842143b0f528d6bc539da6ccb419 (patch) | |
| tree | 1e26ea969a781ed8e323fca4e3c76345113fc694 /www/lib/angular-wizard/src/wizardButtons.js | |
| parent | 676270d21beed31d767a06c89522198c77d5d865 (diff) | |
mega changes, including updates and X
Diffstat (limited to 'www/lib/angular-wizard/src/wizardButtons.js')
| -rw-r--r-- | www/lib/angular-wizard/src/wizardButtons.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/www/lib/angular-wizard/src/wizardButtons.js b/www/lib/angular-wizard/src/wizardButtons.js new file mode 100644 index 00000000..0afb46f8 --- /dev/null +++ b/www/lib/angular-wizard/src/wizardButtons.js @@ -0,0 +1,26 @@ +function wizardButtonDirective(action) { + angular.module('mgo-angular-wizard') + .directive(action, function() { + return { + restrict: 'A', + replace: false, + require: '^wizard', + link: function($scope, $element, $attrs, wizard) { + + $element.on("click", function(e) { + e.preventDefault(); + $scope.$apply(function() { + $scope.$eval($attrs[action]); + wizard[action.replace("wz", "").toLowerCase()](); + }); + }); + } + }; + }); +} + +wizardButtonDirective('wzNext'); +wizardButtonDirective('wzPrevious'); +wizardButtonDirective('wzFinish'); +wizardButtonDirective('wzCancel'); +wizardButtonDirective('wzReset'); |
