Skip to content

Commit

Permalink
Project build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Carter committed Dec 22, 2016
1 parent 7e07240 commit 78f7730
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 42 deletions.
82 changes: 42 additions & 40 deletions dist/angular-wizard.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/**
* Easy to use Wizard library for Angular JS
* @version v0.9.0 - 2016-09-20 * @link https://github.com/mgonto/angular-wizard
* @author Martin Gontovnikas <martin@gon.to>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
angular.module('templates-angularwizard', ['step.html', 'wizard.html']);

angular.module("step.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("step.html",
"<section ng-show=\"selected\" ng-class=\"{current: selected, done: completed}\" class=\"step\" ng-transclude>\n" +
"</section>");
}]);

angular.module("wizard.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("wizard.html",
"<div>\n" +
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'bottom'\" ng-transclude></div>\n" +
" <ul class=\"steps-indicator steps-{{getEnabledSteps().length}}\" ng-if=\"!hideIndicators\">\n" +
" <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" +
" <a ng-click=\"goTo(step)\">{{step.title || step.wzTitle}}</a>\n" +
" </li>\n" +
" </ul>\n" +
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'top'\" ng-transclude></div>\n" +
"</div>\n" +
"");
}]);

/**
* Easy to use Wizard library for Angular JS
* @version v0.10.0 - 2016-12-22 * @link https://github.com/mgonto/angular-wizard
* @author Martin Gontovnikas <martin@gon.to>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
angular.module('templates-angularwizard', ['step.html', 'wizard.html']);

angular.module("step.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("step.html",
"<section ng-show=\"selected\" ng-class=\"{current: selected, done: completed}\" class=\"step\" ng-transclude>\n" +
"</section>");
}]);

angular.module("wizard.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("wizard.html",
"<div>\n" +
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'bottom'\" ng-transclude></div>\n" +
" <ul class=\"steps-indicator steps-{{getEnabledSteps().length}}\" ng-if=\"!hideIndicators\">\n" +
" <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" +
" <a ng-click=\"goTo(step)\">{{step.title || step.wzTitle}}</a>\n" +
" </li>\n" +
" </ul>\n" +
" <div class=\"steps\" ng-if=\"indicatorsPosition === 'top'\" ng-transclude></div>\n" +
"</div>\n" +
"");
}]);

angular.module('mgo-angular-wizard', ['templates-angularwizard']);


angular.module('mgo-angular-wizard').directive('wzStep', function() {
return {
restrict: 'EA',
Expand Down Expand Up @@ -58,7 +58,7 @@ angular.module('mgo-angular-wizard').directive('wzStep', function() {
}
};
});


//wizard directive
angular.module('mgo-angular-wizard').directive('wizard', function() {
return {
Expand Down Expand Up @@ -138,15 +138,17 @@ angular.module('mgo-angular-wizard').directive('wizard', function() {
var editMode = $scope.editMode;
if (angular.isUndefined(editMode) || (editMode === null)) return;

if (editMode) {
angular.forEach($scope.getEnabledSteps(), function(step) {
step.completed = true;
});
} else {
var completedStepsIndex = $scope.currentStepNumber() - 1;
//Set completed for all steps to the value of editMode
angular.forEach($scope.steps, function (step) {
step.completed = editMode;
});

//If editMode is false, set ONLY ENABLED steps with index lower then completedIndex to completed
if (!editMode) {
var completedStepsIndex = $scope.currentStepNumber() - 1;
angular.forEach($scope.getEnabledSteps(), function(step, stepIndex) {
if(stepIndex >= completedStepsIndex) {
step.completed = false;
if(stepIndex < completedStepsIndex) {
step.completed = true;
}
});
}
Expand Down Expand Up @@ -414,7 +416,7 @@ angular.module('mgo-angular-wizard').directive('wizard', function() {
};
}]
};
});
});
function wizardButtonDirective(action) {
angular.module('mgo-angular-wizard')
.directive(action, function() {
Expand All @@ -441,7 +443,7 @@ wizardButtonDirective('wzPrevious');
wizardButtonDirective('wzFinish');
wizardButtonDirective('wzCancel');
wizardButtonDirective('wzReset');


angular.module('mgo-angular-wizard').factory('WizardHandler', function() {
var service = {};

Expand Down
4 changes: 2 additions & 2 deletions dist/angular-wizard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 78f7730

Please sign in to comment.