Merge pull request #1266 from andkit/issue1253

Fix #1253 data table in motion overview displayed incorrectly
This commit is contained in:
Oskar Hahn 2014-05-05 16:14:59 +02:00
commit 9be0409869
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 %}