Changeset - 8aa1148f7a71
[Not reviewed]
0 1 0
James Polley - 7 years ago 2017-10-04 13:55:30
jp@jamezpolley.com
Make datatable work for each table on the page, not just the first
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/registrasion/report.html
Show inline comments
...
 
@@ -49,12 +49,12 @@
 
    <script src="{{ STATIC_URL }}datatables/js/dataTables.bootstrap.js" type="text/javascript"></script>
 
    <script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ace.js"></script>
 
    <script type="text/javascript">
 
        $(function() {
 
        $("table.table-reportdata").dataTable({
 
            "sDom": "<'row'<'col-md-3'l><'col-md-3'T><'col-md-4'f>r>t<'row'<'col-md-3'i><'col-md-5'p>>",
 
        $("table.table-reportdata").each(function () {
 
        $(this).dataTable({
 
        "sDom": "<'row'<'col-md-3'l><'col-md-3'T><'col-md-4'f>r>t<'row'<'col-md-3'i><'col-md-5'p>>",
 
                "sPaginationType": "bootstrap",
 
                "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
 
                "bStateSave": true,
 
                "aLengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
 
                "oTableTools": {
 
                "aButtons": [
 
                "copy",
...
 
@@ -63,7 +63,7 @@
 
                ],
 
                "sSwfPath": "{{ STATIC_URL }}tabletools/swf/copy_csv_xls.swf"
 
                }
 
                });
 
                });
 
            });
 
        });
 
    </script>
 
{% endblock %}
0 comments (0 inline, 0 general)