-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from nccgroup/datatables2
Datatables 2
- Loading branch information
Showing
10 changed files
with
193 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 20 additions & 3 deletions
23
event_tracker/templates/base/external-libs/datatables-basic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
{# use https://www.srihash.org/ for integrity if not on https://cdnjs.com/ #} | ||
<link rel="stylesheet" href="https://cdn.datatables.net/v/bs5/dt-1.13.4/b-2.3.6/date-1.4.1/fh-3.3.2/sb-1.4.2/datatables.min.css" integrity="sha512-kEW8Az2EL66Lst08m47S56qupKJRycFZJ+QC0lrM/kNUVfROSXXI4hywUPoyqPWcimn4vxeJGqLmiVh5JRBgIw==" crossorigin="anonymous"> | ||
<script src="https://cdn.datatables.net/v/bs5/dt-1.13.4/b-2.3.6/date-1.4.1/fh-3.3.2/sb-1.4.2/datatables.min.js" integrity="sha512-RkrDRwehVbBYvstGSalr8yPKbcLA2TThjnrtVXEvxWSk7PP3bDoxBcDVtbz3AKea98UzpqhBLnP6+ThdD+mIxw==" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.datatables.net/v/bs5/dt-2.1.4/b-3.1.1/date-1.5.3/fh-4.0.1/sb-1.8.0/datatables.min.css" integrity="sha384-NkgQmT2leS1PF3E0GY/HMojHV3Mv96eC9tatSiT7VgqyJjdS9eYkHqf5rVcS2flU" crossorigin="anonymous"> | ||
<script src="https://cdn.datatables.net/v/bs5/dt-2.1.4/b-3.1.1/date-1.5.3/fh-4.0.1/sb-1.8.0/datatables.min.js" integrity="sha384-R+CZHUf1UzZxEsbywkUnsMtBgx0SoiGKM8wOACZq3sCrK2Tg+2WzcpCGZp7pZy7u" crossorigin="anonymous"></script> | ||
|
||
{% include "base/external-libs/momentjs.html" %} | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables-plugins/1.13.4/sorting/datetime-moment.min.js" integrity="sha512-cln13IRvnKJQmByR8cXOb9NMF0BzbIQbQb29vbX6mQYKsO1uyRYlGB2jWtGRgXaCq3JWqLqDZNOJ9kHzYH+dkQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables-plugins/2.0.8/sorting/datetime-moment.min.js" integrity="sha512-cln13IRvnKJQmByR8cXOb9NMF0BzbIQbQb29vbX6mQYKsO1uyRYlGB2jWtGRgXaCq3JWqLqDZNOJ9kHzYH+dkQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
|
||
<script nonce="{{request.csp_nonce}}"> | ||
DataTable.datetime("{% datetime_format_moment %}") | ||
DataTable.defaults.column.orderSequence = ['asc', 'desc']; // Remove neutral column sorting as an option - it breaks the server side query string parsing and feels clunky | ||
DataTable.defaults.layout = { | ||
topStart: null, | ||
topEnd: { | ||
features: ['search', 'buttons'] | ||
}, | ||
bottom: { | ||
rowClass: 'mt-2', | ||
features: ['info', 'pageLength', 'paging'] | ||
}, | ||
bottomStart: null, | ||
bottomEnd: null | ||
} | ||
</script> |
23 changes: 20 additions & 3 deletions
23
event_tracker/templates/base/external-libs/datatables-pdfexport.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
{# use https://www.srihash.org/ for integrity if not on https://cdnjs.com/ #} | ||
<link rel="stylesheet" href="https://cdn.datatables.net/v/bs5/dt-1.13.4/b-2.3.6/b-html5-2.3.6/date-1.4.1/fh-3.3.2/sb-1.4.2/datatables.min.css" integrity="sha512-TAISwwR6lNl66WfQHcyCx62vIoRYqzaOZ1L0Mr97C3sUOYgYHeHL2kFdZd4UsJ69o73JW7e4FHaMdO0Js6ykHQ==" crossorigin="anonymous"> | ||
<script src="https://cdn.datatables.net/v/bs5/dt-1.13.4/b-2.3.6/b-html5-2.3.6/date-1.4.1/fh-3.3.2/sb-1.4.2/datatables.min.js" integrity="sha512-5anoVukc27KB1IlOytOHd0MawHJN4EC+XUWwEP1ub9Qy2u3+KW/2yCE42mP3fGDwvJWDs5Ur8y7+P+u11+/gqQ==" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.datatables.net/v/bs5/dt-2.1.4/b-3.1.1/b-html5-3.1.1/date-1.5.3/fh-4.0.1/sb-1.8.0/datatables.min.css" integrity="sha384-byq5ukAC/9bM4DYloC9DXyDbEDwy0qD1FOQcLWNOMYHoBiW+ZgUOMkKQ0Trgffko" crossorigin="anonymous"> | ||
<script src="https://cdn.datatables.net/v/bs5/dt-2.1.4/b-3.1.1/b-html5-3.1.1/date-1.5.3/fh-4.0.1/sb-1.8.0/datatables.min.js" integrity="sha384-PY3/gZOyFRGQ4i6UqwA4QGhCYOsN83rNljQd62TwzlxUnCRyRdAmf9SF8lak6bGQ" crossorigin="anonymous"></script> | ||
|
||
{% include "base/external-libs/momentjs.html" %} | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables-plugins/1.13.4/sorting/datetime-moment.min.js" integrity="sha512-cln13IRvnKJQmByR8cXOb9NMF0BzbIQbQb29vbX6mQYKsO1uyRYlGB2jWtGRgXaCq3JWqLqDZNOJ9kHzYH+dkQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables-plugins/2.0.8/sorting/datetime-moment.min.js" integrity="sha512-cln13IRvnKJQmByR8cXOb9NMF0BzbIQbQb29vbX6mQYKsO1uyRYlGB2jWtGRgXaCq3JWqLqDZNOJ9kHzYH+dkQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
|
||
<script nonce="{{request.csp_nonce}}"> | ||
DataTable.datetime("{% datetime_format_moment %}") | ||
DataTable.defaults.column.orderSequence = ['asc', 'desc']; // Remove neutral column sorting as an option - it breaks the server side query string parsing and feels clunky | ||
DataTable.defaults.layout = { | ||
topStart: null, | ||
topEnd: { | ||
features: ['search', 'buttons'] | ||
}, | ||
bottom: { | ||
rowClass: 'mt-2', | ||
features: ['info', 'pageLength', 'paging'] | ||
}, | ||
bottomStart: null, | ||
bottomEnd: null | ||
} | ||
</script> | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js" integrity="sha512-a9NgEEK7tsCvABL7KqtUTQjl69z7091EVPpw5KxPlZ93T141ffe1woLtbXTX+r2/8TtTvRX/v4zTL2UlMUPgwg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.min.js" integrity="sha512-P0bOMePRS378NwmPDVPU455C/TuxDS+8QwJozdc7PGgN8kLqR4ems0U/3DeJkmiE31749vYWHvBOtR+37qDCZQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.