-
Notifications
You must be signed in to change notification settings - Fork 265
Fixed bugs #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fixed bugs #92
Conversation
soul4code
commented
Mar 27, 2015
- random order of load/add steps when using templates for wzStep directive
- Nested wizards. Loading childwizard steps directive before run directive link function.
- random ordering when using templates for step directive - Nested wizards. Loading childwizard steps directive before run directive link function.
@magnitronus I will get this merged as soon as I can, thanks. |
@jacobscarter Any news on the merge? I currently have the following issue:
The ng-repeat gets an ordered data-set. I even added an extra orderBy to make sure everything is ordered, but the steps still are randomly shown. |
@raftheunis87 That should work. Your Try using single quotes in the ng-repeat="page in pages | orderBy:'sequenceSort'" (see the docs: https://docs.angularjs.org/api/ng/filter/orderBy) |
is there any development on this? I'm having a similar issue with my wizard consisting of 3 steps, where the 2nd step is an ng-repeat. Due to issues discussed above the wizard orders it Step 1, Step 3, and then the Step 2 ng-repeats. I saw that the fix above contains a solution with orderIndex but the current version doesn't seem to support his yet. Any help would be appreciated. |
Can you fix merge conflicts, I will get it merged after, sorry for the huge delay |
}, | ||
require: '^wizard', | ||
templateUrl: function(element, attributes) { | ||
return attributes.template || "step.html"; | ||
}, | ||
link: function($scope, $element, $attrs, wizard) { | ||
$scope.title = $scope.title || $scope.wzTitle; | ||
wizard.addStep($scope); | ||
|
||
//for nested wizards. Add step when tempate for wizard is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
template not tempate
} | ||
else { | ||
$rootScope.$on('mgo-angular-wizard.transcluded', function($event, wzName){ | ||
if (wizard.name==wzName) wizard.addStep($scope); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use {}
in your if statement. Please add space on either side of ==
@@ -15,30 +15,74 @@ angular.module('mgo-angular-wizard').directive('wizard', function() { | |||
return attributes.template || "wizard.html"; | |||
}, | |||
|
|||
link: function($scope, $element, $attributes){ | |||
|
|||
var get_stepnodes = function (parent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
on same like as argument declaration please
{ | ||
var matchingElements = []; | ||
var allElements = parent[0].getElementsByTagName('*'); | ||
for (var i = 0, n = allElements.length; i < n; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (var i = 0; i < allElements.length; i++)
for (var i = 0, n = allElements.length; i < n; i++) | ||
{ | ||
var current = allElements[i], | ||
$current = angular.element(current); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare variable, correct whitespace.
$current = angular.element(current); | ||
|
||
if (!_.isUndefined($current.attr('wz-step')) || current.nodeName.toLowerCase()=='wz-step' || $current.hasClass('step')) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
on same line as ()
var thisModule = this; | ||
|
||
$scope.$watch('transcluded', function(val){ | ||
if (val) thisModule.transcluded = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add {}
@@ -143,7 +200,7 @@ angular.module('mgo-angular-wizard').directive('wizard', function() { | |||
function unselectAll() { | |||
//traverse steps array and set each "selected" property to false | |||
_.each($scope.steps, function (step) { | |||
step.selected = false; | |||
if (step) step.selected = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{}
on new line
@magnitronus can you please fix your syntax to match the coding style of the other contributors for consistency, can you please rebase your branch off our master so you will have the updates that fix issues with automated CI checks failing, can you please write unit tests to cover your new functionality, can you please remove the |
@jacobscarter Sorry to intrude and jump in here, but... what if instead of you acting as a human linter, we actually configure and use one? From my humble POV, you cannot enforce a particular coding style to contributors when you yourself don't (or your project doesn't). On a related note, if you want to avoid contributors/members pushing specific files to the repo, those should be clearly ignored in Also, the link to the contribution guidelines should be: https://github.com/angular-wizard/angular-wizard/blob/master/CONTRIBUTE.md. You pointed to the changelog there. |
@nfantone great points, would you like to make a PR updating the gitignore and adding jslint? |
On second thought, the gitignore would prevent updated build files from pushing when appropriate (unless you have an idea for that). However I like the linter idea and would love to see that incorporated. :) |