Skip to content

Commit

Permalink
repeater-highlight-to-sorted: changing "highlight" class to "sorted"
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinparkerson committed Oct 21, 2014
1 parent 1809a98 commit ed22d2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/repeater-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
$.fn.repeater.Constructor.prototype.list_highlightColumn = function(index, force){
var tbody = this.$canvas.find('.repeater-list tbody');
if(this.options.list_highlightSortedColumn || force){
tbody.find('td.highlight').removeClass('highlight');
tbody.find('td.sorted').removeClass('sorted');
tbody.find('tr').each(function(){
var col = $(this).find('td:nth-child(' + (index + 1) + ')');
col.addClass('highlight');
col.addClass('sorted');
});
}
};
Expand Down
2 changes: 1 addition & 1 deletion less/repeater-list.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
border-left: none;
}

&.highlight {
&.sorted {
background: #f9f9f9;
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/repeater-list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ define(function(require){
break;
case 2:
$col = $repeater.find('.repeater-list tbody tr:first-child td:nth-child(1)');
equal($col.hasClass('highlight'), true, 'correct sorted column highlighted');
equal($col.hasClass('sorted'), true, 'correct sorted column highlighted');
num = 0;
$repeater.find('.repeater-list tbody tr').each(function(){
if($(this).find('td:nth-child(1)').hasClass('highlight')){
if($(this).find('td:nth-child(1)').hasClass('sorted')){
num++;
}
});
Expand Down

0 comments on commit ed22d2e

Please sign in to comment.