Permalink
Browse files

Fixed a bug in the KanbanBoardColumnGrouper.js where group limits wou…

…ldn't work if the first group had a null limit.
  • Loading branch information...
1 parent 208060d commit a9f3cf15b5f9aab62c8614cbb6e6101f340627ad @SQUIDwarrior SQUIDwarrior committed Feb 17, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 Kanban Board Column Grouper/KanbanBoardColumnGrouper.js
@@ -126,15 +126,15 @@ tau.mashups
if (config != null)
/* run through each group and check the limits */
$.each(config, function(column, setup) {
- if (setup.limit == null)
- return false; /* no need to be here and do this if we hvae no limit! */
- var count = 0;
- for (var i = 0; i < setup.columns.length; i++)
- count += getSwimlaneByName(board, setup.columns[i]).find('.kanban-item').length;
- if (count > setup.limit) /* overlimit */
- getGroupedHeaderByName(board,column).attr('style','color: white!important; background: #E44D4D;');
+ if (setup.limit) {
+ var count = 0;
+ for (var i = 0; i < setup.columns.length; i++)
+ count += getSwimlaneByName(board, setup.columns[i]).find('.kanban-item').length;
+ if (count > setup.limit) /* overlimit */
+ getGroupedHeaderByName(board,column).attr('style','color: white!important; background: #E44D4D;');
else /* under limit */
getGroupedHeaderByName(board,column).css({'background-color':'', 'color':''});
+ }
});
});
};

0 comments on commit a9f3cf1

Please sign in to comment.