ColumnSelector: fix column index issue

This commit is contained in:
Mottie 2014-12-22 21:04:26 -06:00
parent 9cd317070f
commit 5786b3eab3

View File

@ -256,8 +256,8 @@ tsColSel = ts.columnSelector = {
$popup.find('.tablesorter-column-selector') $popup.find('.tablesorter-column-selector')
.html( colSel.$container.html() ) .html( colSel.$container.html() )
.find('input').each(function(){ .find('input').each(function(){
var isChecked = indx === 'auto' ? colSel.auto : colSel.states[indx], var indx = $(this).toggleClass( wo.columnSelector_cssChecked, isChecked ).attr('data-column'),
indx = $(this).toggleClass( wo.columnSelector_cssChecked, isChecked ).attr('data-column'); isChecked = indx === 'auto' ? colSel.auto : colSel.states[indx];
$(this).prop( 'checked', isChecked ); $(this).prop( 'checked', isChecked );
}); });
colSel.$popup = $popup.on('change', 'input', function(){ colSel.$popup = $popup.on('change', 'input', function(){