Fix #1253 data table in motion overview displayed incorrectly

This commit is contained in:
Andy Kittner 2014-05-02 13:17:55 +02:00
parent 943ede2e81
commit 4af6fe1c9a
2 changed files with 8 additions and 5 deletions

View File

@ -11,7 +11,6 @@
/* Table initialisation */
$(document).ready(function() {
$('#dataTable').dataTable( {
"bDestroy": true,
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, gettext("All")]],
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ -1 ] }

View File

@ -15,10 +15,14 @@
<script src="{% static 'js/naturalSort.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery/dataTables.bootstrap.js' %}" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
$('#dataTable').dataTable( {
"aoColumnDefs": [
{ "sType": "natural", "aTargets": [ 0 ] }
],
$(document).ready(function()
{
var tblapi = $('#dataTable').dataTable();
// change sort type to "natural", sadly there seems to be no public API
// to change the sort type so we have to resort to using a private API
tblapi._fnColumnOptions(0, {'sType': 'natural'});
// redraw necessary to apply changed sort settings
tblapi.fnDraw();
});
</script>
{% endblock %}