Skip to content

Commit

Permalink
fix table sorter for columns without sort attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed Oct 3, 2011
1 parent f5d50a7 commit e11e2b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion root/static/js/cpan.js
Expand Up @@ -92,7 +92,9 @@ $(document).ready(function() {
$('#signin').mouseleave(function(){$('#signin').hide()});
if(typeof defaultSort == "undefined") defaultSort = [[0,0]];
$('.tablesorter').tablesorter({sortList: defaultSort, widgets: ['zebra'],textExtraction: function(node){
var sortBy = node.firstChild.getAttribute('sort');
try {
var sortBy = node.firstChild.getAttribute('sort');
} catch(err) {}
if(sortBy && node.getAttribute('class') == 'date') {
var date = new Date(node.firstChild.getAttribute('sort'));
return date.getTime();
Expand Down

0 comments on commit e11e2b9

Please sign in to comment.