Archived
1
0
Fork 0

Use separate JavaScript file to initialize DataTables

This commit is contained in:
Varakh 2019-11-10 15:48:14 +01:00
parent b161b389b4
commit 38e562a3ac
4 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,8 @@
# CHANGELOG # CHANGELOG
## 2.2.1 - 2019/11/10
* Use separate JavaScript file to initialize DataTables
## 2.2.0 - 2019/11/10 ## 2.2.0 - 2019/11/10
* Add version tag to footer * Add version tag to footer
* Add sortable tables * Add sortable tables

View file

@ -13,7 +13,7 @@ class Constants
/** /**
* Version tag * Version tag
*/ */
const VERSION = '2.2.1-SNAPSHOT'; const VERSION = '2.2.1';
/** /**
* Return constant by it's class name * Return constant by it's class name

View file

@ -0,0 +1,8 @@
$(document).ready(function () {
$('#table').DataTable({
"language": {
"url": "/theme/bootstrap4/DataTables/en_dataTable.json"
},
"paging": false
});
});

View file

@ -68,18 +68,9 @@
<!-- Script --> <!-- Script -->
<script src="/theme/bootstrap4/js/bootstrap.bundle.min.js"></script> <script src="/theme/bootstrap4/js/bootstrap.bundle.min.js"></script>
<script src="/theme/bootstrap4/DataTables/datatables.min.js"></script> <script src="/theme/bootstrap4/DataTables/datatables.min.js"></script>
<script src="/theme/bootstrap4/js/custom.js"></script>
{% block js %} {% block js %}
<script>
$(document).ready(function() {
$('#table').DataTable( {
"language": {
"url": "/theme/bootstrap4/DataTables/en_dataTable.json"
},
"paging": false
} );
} );
</script>
{% endblock %} {% endblock %}
</body> </body>