Fix #1253 data table in motion overview displayed incorrectly
This commit is contained in:
parent
943ede2e81
commit
4af6fe1c9a
@ -11,7 +11,6 @@
|
|||||||
/* Table initialisation */
|
/* Table initialisation */
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#dataTable').dataTable( {
|
$('#dataTable').dataTable( {
|
||||||
"bDestroy": true,
|
|
||||||
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, gettext("All")]],
|
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, gettext("All")]],
|
||||||
"aoColumnDefs": [
|
"aoColumnDefs": [
|
||||||
{ "bSortable": false, "aTargets": [ -1 ] }
|
{ "bSortable": false, "aTargets": [ -1 ] }
|
||||||
|
@ -15,10 +15,14 @@
|
|||||||
<script src="{% static 'js/naturalSort.js' %}" type="text/javascript"></script>
|
<script src="{% static 'js/naturalSort.js' %}" type="text/javascript"></script>
|
||||||
<script src="{% static 'js/jquery/dataTables.bootstrap.js' %}" type="text/javascript"></script>
|
<script src="{% static 'js/jquery/dataTables.bootstrap.js' %}" type="text/javascript"></script>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
$('#dataTable').dataTable( {
|
$(document).ready(function()
|
||||||
"aoColumnDefs": [
|
{
|
||||||
{ "sType": "natural", "aTargets": [ 0 ] }
|
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>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user