From bd57db4fdd8b0599c86e3935046b0f788d24202c Mon Sep 17 00:00:00 2001 From: osaajani <> Date: Fri, 23 Apr 2021 22:56:27 +0200 Subject: [PATCH] add variable length for lists + add timestamps for some entries --- templates/call/list.php | 2 +- templates/command/list.php | 2 +- templates/conditional_group/list.php | 13 +++++++++++-- templates/contact/list.php | 6 +++++- templates/discussion/list.php | 2 +- templates/event/list.php | 2 +- templates/group/list.php | 6 +++++- templates/phone/list.php | 2 +- templates/received/list.php | 2 +- templates/scheduled/list.php | 2 +- templates/sended/list.php | 2 +- templates/smsstop/list.php | 2 +- templates/user/list.php | 2 +- templates/webhook/list.php | 2 +- 14 files changed, 32 insertions(+), 15 deletions(-) diff --git a/templates/call/list.php b/templates/call/list.php index 7fed56a..76d2eaf 100644 --- a/templates/call/list.php +++ b/templates/call/list.php @@ -69,7 +69,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/command/list.php b/templates/command/list.php index 89a2ab1..df6b555 100644 --- a/templates/command/list.php +++ b/templates/command/list.php @@ -72,7 +72,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/conditional_group/list.php b/templates/conditional_group/list.php index b8ce2ad..bca9c0f 100644 --- a/templates/conditional_group/list.php +++ b/templates/conditional_group/list.php @@ -41,6 +41,8 @@ Nom Condition + Date de création + Dernière modification ✓ @@ -72,7 +74,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, @@ -87,7 +89,14 @@ jQuery(document).ready(function () }, "columns" : [ {data: 'name', render: jQuery.fn.dataTable.render.text()}, - {data: 'condition', render: jQuery.fn.dataTable.render.text()}, + { + data: 'condition', + render: function (data, type, row, meta) { + return '' + jQuery.fn.dataTable.render.text().display(data) + ''; + }, + }, + {data: 'created_at'}, + {data: 'updated_at'}, { data: 'id', render: function (data, type, row, meta) { diff --git a/templates/contact/list.php b/templates/contact/list.php index 47e3d18..6f5bd98 100644 --- a/templates/contact/list.php +++ b/templates/contact/list.php @@ -43,6 +43,8 @@ Nom Numéro + Date de création + Dernière modification ✓ @@ -128,7 +130,7 @@ jQuery(document).ready(function() //Datatable jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, @@ -144,6 +146,8 @@ jQuery(document).ready(function() "columns" : [ {data: 'name', render: jQuery.fn.dataTable.render.text()}, {data: 'number_formatted'}, + {data: 'created_at'}, + {data: 'updated_at'}, { data: 'id', render: function (data, type, row, meta) { diff --git a/templates/discussion/list.php b/templates/discussion/list.php index 8b27505..fe8edcb 100644 --- a/templates/discussion/list.php +++ b/templates/discussion/list.php @@ -64,7 +64,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/event/list.php b/templates/event/list.php index 7f034c1..48086c1 100644 --- a/templates/event/list.php +++ b/templates/event/list.php @@ -71,7 +71,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/group/list.php b/templates/group/list.php index 30b2670..6c5c2fb 100644 --- a/templates/group/list.php +++ b/templates/group/list.php @@ -41,6 +41,8 @@ Nom Nombre de contacts + Date de création + Dernière modification ✓ @@ -72,7 +74,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, @@ -88,6 +90,8 @@ jQuery(document).ready(function () "columns" : [ {data: 'name', render: jQuery.fn.dataTable.render.text()}, {data: 'nb_contact', render: jQuery.fn.dataTable.render.text()}, + {data: 'created_at'}, + {data: 'updated_at'}, { data: 'id', render: function (data, type, row, meta) { diff --git a/templates/phone/list.php b/templates/phone/list.php index 2d93d65..73fe1a0 100644 --- a/templates/phone/list.php +++ b/templates/phone/list.php @@ -72,7 +72,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/received/list.php b/templates/received/list.php index bab2b53..894777c 100644 --- a/templates/received/list.php +++ b/templates/received/list.php @@ -79,7 +79,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/scheduled/list.php b/templates/scheduled/list.php index 63576e2..674589c 100644 --- a/templates/scheduled/list.php +++ b/templates/scheduled/list.php @@ -72,7 +72,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/sended/list.php b/templates/sended/list.php index 15e837c..1430640 100644 --- a/templates/sended/list.php +++ b/templates/sended/list.php @@ -69,7 +69,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/smsstop/list.php b/templates/smsstop/list.php index 9e6ab7e..c62ebd9 100644 --- a/templates/smsstop/list.php +++ b/templates/smsstop/list.php @@ -70,7 +70,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/user/list.php b/templates/user/list.php index 59775cd..87d70a3 100644 --- a/templates/user/list.php +++ b/templates/user/list.php @@ -74,7 +74,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", }, diff --git a/templates/webhook/list.php b/templates/webhook/list.php index 20a99b9..c56b23d 100644 --- a/templates/webhook/list.php +++ b/templates/webhook/list.php @@ -69,7 +69,7 @@ jQuery(document).ready(function () { jQuery('.datatable').DataTable({ "pageLength": 25, - "bLengthChange": false, + "lengthMenu": [[25, 50, 100, 1000, 10000, -1], [25, 50, 100, 1000, 10000, "All"]], "language": { "url": HTTP_PWD + "/assets/js/datatables/french.json", },