user-upload
3,547
回編集
(標準のソート機能の読み込みを阻止できない場合に、割り当てられたアクションを取り除くようにした) |
(data-sort-type="number" の動作をデフォルトに近づける(第6回総選挙#速報発表の不具合を修正)) |
||
60行目: | 60行目: | ||
}); | }); | ||
} | } | ||
}); | |||
$.tablesorter.addParser({ | |||
id: 'number', | |||
is: $.tablesorter.isDigit, | |||
format: function(s) { | |||
var i = parseFloat(s.replace( /[, ]/g, '').replace('\u2212', '-')); | |||
return isNaN(i) ? 0 : i; | |||
}, | |||
type: 'numeric' | |||
}); | }); | ||
86行目: | 96行目: | ||
$cell.data('sorter', false); | $cell.data('sorter', false); | ||
} else if ($cell.data('sortType') === 'number') { | } else if ($cell.data('sortType') === 'number') { | ||
$cell.data('sorter', ' | $cell.data('sorter', 'number'); | ||
} | } | ||
}); | }); |