Skip to content

Commit 78f7730

Browse files
author
Jacob Carter
committed
Project build
1 parent 7e07240 commit 78f7730

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-42
lines changed

dist/angular-wizard.js

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
/**
2-
* Easy to use Wizard library for Angular JS
3-
* @version v0.9.0 - 2016-09-20 * @link https://github.com/mgonto/angular-wizard
4-
* @author Martin Gontovnikas <martin@gon.to>
5-
* @license MIT License, http://www.opensource.org/licenses/MIT
6-
*/
7-
angular.module('templates-angularwizard', ['step.html', 'wizard.html']);
8-
9-
angular.module("step.html", []).run(["$templateCache", function($templateCache) {
10-
$templateCache.put("step.html",
11-
"<section ng-show=\"selected\" ng-class=\"{current: selected, done: completed}\" class=\"step\" ng-transclude>\n" +
12-
"</section>");
13-
}]);
14-
15-
angular.module("wizard.html", []).run(["$templateCache", function($templateCache) {
16-
$templateCache.put("wizard.html",
17-
"<div>\n" +
18-
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'bottom'\" ng-transclude></div>\n" +
19-
" <ul class=\"steps-indicator steps-{{getEnabledSteps().length}}\" ng-if=\"!hideIndicators\">\n" +
20-
" <li ng-class=\"{default: !step.completed && !step.selected, current: step.selected && !step.completed, done: step.completed && !step.selected, editing: step.selected && step.completed}\" ng-repeat=\"step in getEnabledSteps()\">\n" +
21-
" <a ng-click=\"goTo(step)\">{{step.title || step.wzTitle}}</a>\n" +
22-
" </li>\n" +
23-
" </ul>\n" +
24-
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'top'\" ng-transclude></div>\n" +
25-
"</div>\n" +
26-
"");
27-
}]);
28-
1+
/**
2+
* Easy to use Wizard library for Angular JS
3+
* @version v0.10.0 - 2016-12-22 * @link https://github.com/mgonto/angular-wizard
4+
* @author Martin Gontovnikas <martin@gon.to>
5+
* @license MIT License, http://www.opensource.org/licenses/MIT
6+
*/
7+
angular.module('templates-angularwizard', ['step.html', 'wizard.html']);
8+
9+
angular.module("step.html", []).run(["$templateCache", function($templateCache) {
10+
$templateCache.put("step.html",
11+
"<section ng-show=\"selected\" ng-class=\"{current: selected, done: completed}\" class=\"step\" ng-transclude>\n" +
12+
"</section>");
13+
}]);
14+
15+
angular.module("wizard.html", []).run(["$templateCache", function($templateCache) {
16+
$templateCache.put("wizard.html",
17+
"<div>\n" +
18+
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'bottom'\" ng-transclude></div>\n" +
19+
" <ul class=\"steps-indicator steps-{{getEnabledSteps().length}}\" ng-if=\"!hideIndicators\">\n" +
20+
" <li ng-class=\"{default: !step.completed && !step.selected, current: step.selected && !step.completed, done: step.completed && !step.selected, editing: step.selected && step.completed}\" ng-repeat=\"step in getEnabledSteps()\">\n" +
21+
" <a ng-click=\"goTo(step)\">{{step.title || step.wzTitle}}</a>\n" +
22+
" </li>\n" +
23+
" </ul>\n" +
24+
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'top'\" ng-transclude></div>\n" +
25+
"</div>\n" +
26+
"");
27+
}]);
28+
2929
angular.module('mgo-angular-wizard', ['templates-angularwizard']);
30-
30+
3131
angular.module('mgo-angular-wizard').directive('wzStep', function() {
3232
return {
3333
restrict: 'EA',
@@ -58,7 +58,7 @@ angular.module('mgo-angular-wizard').directive('wzStep', function() {
5858
}
5959
};
6060
});
61-
61+
6262
//wizard directive
6363
angular.module('mgo-angular-wizard').directive('wizard', function() {
6464
return {
@@ -138,15 +138,17 @@ angular.module('mgo-angular-wizard').directive('wizard', function() {
138138
var editMode = $scope.editMode;
139139
if (angular.isUndefined(editMode) || (editMode === null)) return;
140140

141-
if (editMode) {
142-
angular.forEach($scope.getEnabledSteps(), function(step) {
143-
step.completed = true;
144-
});
145-
} else {
146-
var completedStepsIndex = $scope.currentStepNumber() - 1;
141+
//Set completed for all steps to the value of editMode
142+
angular.forEach($scope.steps, function (step) {
143+
step.completed = editMode;
144+
});
145+
146+
//If editMode is false, set ONLY ENABLED steps with index lower then completedIndex to completed
147+
if (!editMode) {
148+
var completedStepsIndex = $scope.currentStepNumber() - 1;
147149
angular.forEach($scope.getEnabledSteps(), function(step, stepIndex) {
148-
if(stepIndex >= completedStepsIndex) {
149-
step.completed = false;
150+
if(stepIndex < completedStepsIndex) {
151+
step.completed = true;
150152
}
151153
});
152154
}
@@ -414,7 +416,7 @@ angular.module('mgo-angular-wizard').directive('wizard', function() {
414416
};
415417
}]
416418
};
417-
});
419+
});
418420
function wizardButtonDirective(action) {
419421
angular.module('mgo-angular-wizard')
420422
.directive(action, function() {
@@ -441,7 +443,7 @@ wizardButtonDirective('wzPrevious');
441443
wizardButtonDirective('wzFinish');
442444
wizardButtonDirective('wzCancel');
443445
wizardButtonDirective('wzReset');
444-
446+
445447
angular.module('mgo-angular-wizard').factory('WizardHandler', function() {
446448
var service = {};
447449

dist/angular-wizard.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)