From 37d19150070b1fa38ae4588c4d87c9a1273c2894 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 3 Jan 2024 00:15:08 +0100 Subject: [PATCH] Fontes : datatables --- core/module/theme/theme.php | 5 ++++- core/module/theme/view/font/font.js.php | 24 +++++++++++++++++++++++- core/module/theme/view/font/font.php | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index a5564b2..a0b7083 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -684,7 +684,10 @@ class theme extends common // Valeurs en sortie $this->addOutput([ 'title' => helper::translate('Fontes'), - 'view' => 'font' + 'view' => 'font', + 'vendor' => [ + 'datatables' + ] ]); } diff --git a/core/module/theme/view/font/font.js.php b/core/module/theme/view/font/font.js.php index ff5e5be..7c3eddf 100644 --- a/core/module/theme/view/font/font.js.php +++ b/core/module/theme/view/font/font.js.php @@ -8,4 +8,26 @@ * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International * @link http://zwiicms.fr/ */ -$(".themeFontDelete").on("click",(function(){var _this=$(this);return core.confirm("Êtes-vous sûr de vouloir supprimer cette fonte ?",(function(){$(location).attr("href",_this.attr("href"))}))})); \ No newline at end of file +$(".themeFontDelete").on("click", (function() { + var _this = $(this); + return core.confirm("Êtes-vous sûr de vouloir supprimer cette fonte ?", (function() { + $(location).attr("href", _this.attr("href")) + })) +})); +$('#dataTables').DataTable({ + language: { + url: "core/vendor/datatables/french.json", + }, + locale: 'fr', + "columnDefs": [{ + target: 5, + orderable: false, + searchable: false + }, + { + target: 6, + orderable: false, + searchable: false + } + ] +}); \ No newline at end of file diff --git a/core/module/theme/view/font/font.php b/core/module/theme/view/font/font.php index 1c62fbf..2b69d8c 100644 --- a/core/module/theme/view/font/font.php +++ b/core/module/theme/view/font/font.php @@ -24,7 +24,7 @@ - + 'dataTables']); ?> \ No newline at end of file