diff --git a/CHANGELOG.md b/CHANGELOG.md index aec2310..37aa020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 2.2.1 - 2019/11/10 +* Use separate JavaScript file to initialize DataTables + ## 2.2.0 - 2019/11/10 * Add version tag to footer * Add sortable tables diff --git a/config/Constants.php b/config/Constants.php index 848dc07..257e3b2 100644 --- a/config/Constants.php +++ b/config/Constants.php @@ -13,7 +13,7 @@ class Constants /** * Version tag */ - const VERSION = '2.2.1-SNAPSHOT'; + const VERSION = '2.2.1'; /** * Return constant by it's class name diff --git a/public/theme/bootstrap4/js/custom.js b/public/theme/bootstrap4/js/custom.js new file mode 100644 index 0000000..20e5e95 --- /dev/null +++ b/public/theme/bootstrap4/js/custom.js @@ -0,0 +1,8 @@ +$(document).ready(function () { + $('#table').DataTable({ + "language": { + "url": "/theme/bootstrap4/DataTables/en_dataTable.json" + }, + "paging": false + }); +}); \ No newline at end of file diff --git a/src/View/bootstrap4/layout.twig b/src/View/bootstrap4/layout.twig index 46aaacd..443913a 100644 --- a/src/View/bootstrap4/layout.twig +++ b/src/View/bootstrap4/layout.twig @@ -68,18 +68,9 @@ + {% block js %} - {% endblock %}