From 43d11b2fb77159f1f3e674815c4fb893c693f6c4 Mon Sep 17 00:00:00 2001 From: Caribana Date: Tue, 1 May 2018 14:45:25 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20param=C3=A8tre=20saveState=20dans=20ins?= =?UTF-8?q?tanciation=20DataTable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accred_list.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/accred_list.php b/accred_list.php index 7f5ab2ed..e2d92d38 100644 --- a/accred_list.php +++ b/accred_list.php @@ -278,7 +278,6 @@ if ($mysqli->connect_errno) { function format ( row ) { var d = $.parseJSON(row).data[0]; // `d` is the original data object for the row -console.log(d); var ret = ''+ ''+ ''+ @@ -325,7 +324,8 @@ console.log(d); } $(document).ready(function(){ - var table = $('#example').DataTable( { + var table = $('#example') +.DataTable( { "language": { "sInfoEmpty": "Il n'y a rien à montrer...", "sEmptyTable": "Tu n'as pas encore de demandes enregistrées...", @@ -339,6 +339,8 @@ $(document).ready(function(){ }, "search": "Rechercher" }, + stateSave: true, + "ajax": 'ajax/data/arrays', "columns": [ { "data": "mid" }, @@ -380,6 +382,7 @@ $(document).ready(function(){ ); $('#identification').on('click', function() { $('#uid').toggle(); +table.page( 5 ).draw( false ); }); // Add event listener for opening and closing details @@ -403,7 +406,6 @@ $(document).ready(function(){ });; } ); - // Add event listener for editing entries $('#example tbody').on('click', 'td.bck-edit', function () { var tr = $(this).closest('tr');
Commande pour: