Changeset - d0f4b1c45506
[Not reviewed]
0 4 0
James Polley - 7 years ago 2017-10-08 05:14:28
jp@jamezpolley.com
Update datatables libraries

This fixes some display issues and adds functionality.
4 files changed with 43 insertions and 147 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/registrasion/report.html
Show inline comments
...
 
@@ -19,7 +19,11 @@
 

	
 
{% for report in reports %}
 
<h3>{{ report.title }}</h3>
 
{% if report.headings %}
 
<table class="table table-striped table-reportdata">
 
{% else %}
 
    <table class="table table-striped">
 
{% endif %}
 
    <thead>
 
        <tr>
 
            {% for heading in report.headings %}
...
 
@@ -38,32 +42,25 @@
 
        </tr>
 
        {% endfor %}
 
    </tbody>
 
</table>
 
    </table>
 

	
 
<hr />
 
{% endfor %}
 

	
 
{% endblock %}
 

	
 
{% block extra_script %}
 
    <script src="{{ STATIC_URL }}datatables/js/jquery.dataTables.min.js" type="text/javascript"></script>
 
    <script src="{{ STATIC_URL }}tabletools/js/TableTools.min.js" type="text/javascript"></script>
 
    <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">
 
        $("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",
 
                "bStateSave": true,
 
                "aLengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
 
                "oTableTools": {
 
                "aButtons": [
 
                "copy",
 
                "csv",
 
                "print"
 
                ],
 
                "sSwfPath": "{{ STATIC_URL }}tabletools/swf/copy_csv_xls.swf"
 
                }
 
            });
 
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-html5-1.4.2/b-print-1.4.2/r-2.2.0/datatables.min.css"/>
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
 
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-html5-1.4.2/b-print-1.4.2/r-2.2.0/datatables.min.js"></script>
 
<script type="text/javascript">
 
        $("table.table-reportdata").dataTable({
 
            "dom": "<'row'<'col-md-3'l><'col-md-3'B><'col-md-4'f>r>t<'row'<'col-md-3'i><'col-md-5'p>>",
 
            "stateSave": true,
 
            "lengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
 
            "pageLength": 100,
 
            "buttons": [ "copy", "csv", "print"]
 
        });
 
    </script>
 
{% endblock %}
pinaxcon/templates/symposion/conference/user_list.html
Show inline comments
...
 
@@ -4,47 +4,9 @@
 

	
 
{% block head_title %}User List{% endblock %}
 

	
 
{% block extra_style %}
 
    <style type="text/css">
 
        div.dataTables_length label {
 
            float: left;
 
            text-align: left;
 
        }
 
        div.dataTables_length select {
 
            width: 75px;
 
        }
 
        div.dataTables_filter label {
 
            float: right;
 
        }
 
        div.dataTables_info {
 
            padding-top: 8px;
 
        }
 
        div.dataTables_paginate {
 
            float: right;
 
            margin: 0;
 
        }
 
        table.table {
 
            clear: both;
 
            margin-bottom: 6px !important;
 
            background-color: white;
 
        }
 
        table.table thead .sorting,
 
        table.table thead .sorting_asc,
 
        table.table thead .sorting_desc,
 
        table.table thead .sorting_asc_disabled,
 
        table.table thead .sorting_desc_disabled {
 
            cursor: pointer;
 
            *cursor: hand;
 
        }
 
        table.dataTable th:active {
 
            outline: none;
 
        }
 
    </style>
 
{% endblock %}
 

	
 
{% block body_outer %}
 
    <h1>User List</h1>
 
    <table class="table table-striped table-bordered table-reviews">
 
    <table class="table table-striped table-bordered table-reportdata">
 
        <thead>
 
            <th>{% trans "Email" %}</th>
 
            <th>{% trans "Name" %}</th>
...
 
@@ -70,26 +32,18 @@
 
{% endblock %}
 

	
 
{% block extra_script %}
 
    <script src="{{ STATIC_URL }}datatables/js/jquery.dataTables.min.js" type="text/javascript"></script>
 
    <script src="{{ STATIC_URL }}tabletools/js/TableTools.min.js" type="text/javascript"></script>
 
    <script src="{{ STATIC_URL }}datatables/js/dataTables.bootstrap.js" type="text/javascript"></script>
 
    <script type="text/javascript">
 
        $(function() {
 
            $(".tip").tooltip();
 
            $("table.table-reviews").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",
 
                "bStateSave": true,
 
                "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
 
                "oTableTools": {
 
                    "aButtons": [
 
                        "copy",
 
                        "csv",
 
                        "print"
 
                    ],
 
                    "sSwfPath": "{{ STATIC_URL }}tabletools/swf/copy_csv_xls.swf"
 
                }
 
            });
 
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-html5-1.4.2/b-print-1.4.2/r-2.2.0/datatables.min.css"/>
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
 
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-html5-1.4.2/b-print-1.4.2/r-2.2.0/datatables.min.js"></script>
 
<script type="text/javascript">
 
        $("table.table-reportdata").dataTable({
 
            "dom": "lBfrtip",
 
            "stateSave": true,
 
            "lengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
 
            "pageLength": 100,
 
            "buttons": [ "copy", "csv", "print"]
 
        });
 
    </script>
 
{% endblock %}
 

	
pinaxcon/templates/symposion/reviews/base.html
Show inline comments
...
 
@@ -3,52 +3,6 @@
 

	
 
{% load i18n %}
 

	
 
{% block extra_style %}
 
{{ block.super }}
 
    <style type="text/css">
 
        div.dataTables_length label {
 
            float: left;
 
            text-align: left;
 
        }
 

	
 
        div.dataTables_length select {
 
            width: 75px;
 
        }
 

	
 
        div.dataTables_filter label {
 
            float: right;
 
        }
 

	
 
        div.dataTables_info {
 
            padding-top: 8px;
 
        }
 

	
 
        div.dataTables_paginate {
 
            float: right;
 
            margin: 0;
 
        }
 

	
 
        table.table {
 
            clear: both;
 
            margin-bottom: 6px !important;
 
            background-color: white;
 
        }
 

	
 
        table.table thead .sorting,
 
        table.table thead .sorting_asc,
 
        table.table thead .sorting_desc,
 
        table.table thead .sorting_asc_disabled,
 
        table.table thead .sorting_desc_disabled {
 
            cursor: pointer;
 
            *cursor: hand;
 
        }
 

	
 
        table.dataTable th:active {
 
            outline: none;
 
        }
 
    </style>
 
{% endblock %}
 

	
 
{% block body_class %}reviews{% endblock %}
 

	
 
{% block body_outer %}
...
 
@@ -101,28 +55,18 @@
 
    </div>
 
</div></div></div>
 
{% endblock %}
 

	
 
{% block extra_script %}
 
    <script src="{{ STATIC_URL }}datatables/js/jquery.dataTables.min.js" type="text/javascript"></script>
 
    <script src="{{ STATIC_URL }}tabletools/js/TableTools.min.js" type="text/javascript"></script>
 
    <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">
 
        $("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",
 
                "bStateSave": true,
 
                "aLengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
 
                "oTableTools": {
 
                "aButtons": [
 
                "copy",
 
                "csv",
 
                "print"
 
                ],
 
                "sSwfPath": "{{ STATIC_URL }}tabletools/swf/copy_csv_xls.swf"
 
                }
 
            });
 
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-html5-1.4.2/b-print-1.4.2/r-2.2.0/datatables.min.css"/>
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
 
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-html5-1.4.2/b-print-1.4.2/r-2.2.0/datatables.min.js"></script>
 
<script type="text/javascript">
 
        $("table.table-reviewlist").dataTable({
 
            "dom": "<'row'<'col-md-3'l><'col-md-3'B><'col-md-4'f>r>t<'row'<'col-md-3'i><'col-md-5'p>>",
 
            "stateSave": true,
 
            "lengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]],
 
            "pageLength": 100,
 
            "buttons": [ "copy", "csv", "print"]
 
        });
 
    </script>
 
{% endblock %}
pinaxcon/urls.py
Show inline comments
...
 
@@ -17,6 +17,7 @@ urlpatterns = [
 
    url(r"^proposals/", include("symposion.proposals.urls")),
 
    url(r"^reviews/", include("symposion.reviews.urls")),
 
    url(r"^schedule/", include("symposion.schedule.urls")),
 
    url(r"^conference/", include("symposion.conference.urls")),
 

	
 
    url(r"^teams/", include("symposion.teams.urls")),
 

	
0 comments (0 inline, 0 general)