From bbe8eccda99af6e5965196262e5154a1d654cef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=AFeul=20Rouquette?= Date: Sun, 24 May 2020 18:37:19 +0200 Subject: [PATCH] Uniformiser une fois pour tout: formidable_ts et pas formidable_tablesorter. --- ...er_export.php => formidable_ts_export.php} | 2 +- ...rmidable_tablesorter_prive_bloc_entete.css | 34 ------------------- ...able_tablesorter.css => formidable_ts.css} | 8 ++--- css/formidable_ts_prive_bloc_entete.css | 34 +++++++++++++++++++ ...ss => formidable_ts_prive_layout_page.css} | 6 ++-- formidable_ts_administrations.php | 6 ++-- formidable_ts_pipelines.php | 2 +- inclure/formidable_tablesorter_preambule.html | 6 ---- ...outons.html => formidable_ts_boutons.html} | 0 ..._entete.html => formidable_ts_entete.html} | 10 +++--- ...iltres.html => formidable_ts_filtres.html} | 0 inclure/formidable_ts_preambule.html | 6 ++++ ...idable_tablesorter.js => formidable_ts.js} | 12 +++---- lang/formidable_ts_fr.php | 2 +- lang/paquet-formidable_ts_fr.php | 2 +- ...le_tablesorter.html => formidable_ts.html} | 10 +++--- ...ctions.php => formidable_ts_fonctions.php} | 0 ...le_tablesorter.html => formidable_ts.html} | 2 +- ...le_tablesorter.html => formidable_ts.html} | 0 ...le_tablesorter.html => formidable_ts.html} | 0 20 files changed, 71 insertions(+), 71 deletions(-) rename action/{formidable_tablesorter_export.php => formidable_ts_export.php} (95%) delete mode 100644 css/formidable_tablesorter_prive_bloc_entete.css rename css/{formidable_tablesorter.css => formidable_ts.css} (86%) create mode 100644 css/formidable_ts_prive_bloc_entete.css rename css/{formidable_tablesorter_prive_layout_page.css => formidable_ts_prive_layout_page.css} (52%) delete mode 100644 inclure/formidable_tablesorter_preambule.html rename inclure/{formidable_tablesorter_boutons.html => formidable_ts_boutons.html} (100%) rename inclure/{formidable_tablesorter_entete.html => formidable_ts_entete.html} (76%) rename inclure/{formidable_tablesorter-filtres.html => formidable_ts_filtres.html} (100%) create mode 100644 inclure/formidable_ts_preambule.html rename javascript/{formidable_tablesorter.js => formidable_ts.js} (96%) rename modeles/{formidable_tablesorter.html => formidable_ts.html} (89%) rename modeles/{formidable_tablesorter_fonctions.php => formidable_ts_fonctions.php} (100%) rename prive/squelettes/contenu/{formidable_tablesorter.html => formidable_ts.html} (64%) rename prive/squelettes/hierarchie/{formidable_tablesorter.html => formidable_ts.html} (100%) rename prive/squelettes/top/{formidable_tablesorter.html => formidable_ts.html} (100%) diff --git a/action/formidable_tablesorter_export.php b/action/formidable_ts_export.php similarity index 95% rename from action/formidable_tablesorter_export.php rename to action/formidable_ts_export.php index 842df3e..b8eefb5 100644 --- a/action/formidable_tablesorter_export.php +++ b/action/formidable_ts_export.php @@ -8,7 +8,7 @@ use Box\Spout\Writer\Common\Creator\WriterEntityFactory; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; use Box\Spout\Common\Entity\Style\Color; -function action_formidable_tablesorter_export() { +function action_formidable_ts_export() { $data = json_decode(_request('data')); $type_export = _request('type_export'); $filename = _request('filename'); diff --git a/css/formidable_tablesorter_prive_bloc_entete.css b/css/formidable_tablesorter_prive_bloc_entete.css deleted file mode 100644 index 3e7acd4..0000000 --- a/css/formidable_tablesorter_prive_bloc_entete.css +++ /dev/null @@ -1,34 +0,0 @@ -/** Le bloc d'action et d'aide**/ -.formidable_tablesorter-preambule { - display:flex; - justify-content:space-around; -} -.formidable_tablesorter-preambule > *{ - width:45%; - max-width:1024px; - height:min-content; -} -.formidable_tablesorter-preambule .aide { - padding:1ex; -} -.formidable_tablesorter-preambule .aide p { - padding:0px; - margin:0px; -} -.formidable_tablesorter-preambule .boutons{ - text-align:left; -} -.formidable_tablesorter-preambule .boutons label { - padding:4px; -} -.formidable_tablesorter #columnSelectorButton{ - display:inline-block; -} -.formidable_tablesorter #columnSelector { - display: flex; - flex-wrap:wrap; -} -.formidable_tablesorter #columnSelector label { - width:50%; - padding:0px; -} diff --git a/css/formidable_tablesorter.css b/css/formidable_ts.css similarity index 86% rename from css/formidable_tablesorter.css rename to css/formidable_ts.css index 503d0d9..f8d2445 100644 --- a/css/formidable_tablesorter.css +++ b/css/formidable_ts.css @@ -2,20 +2,20 @@ * éviter les debordement, * inspiré de https://mottie.github.io/tablesorter/docs/example-widget-resizable.html **/ -.formidable_tablesorter-wrapper { +.formidable_ts-wrapper { max-width:100%; width:100%; overflow-x:scroll; } -.formidable_tablesorter-wrapper table { +.formidable_ts-wrapper table { width: auto; } -.formidable_tablesorter-wrapper .tablesorter td { +.formidable_ts-wrapper .tablesorter td { overflow: hidden; text-overflow: ellipsis; min-width: 10px; } -.formidable_tablesorter-wrapper .tablesorter th { +.formidable_ts-wrapper .tablesorter th { overflow: hidden; text-overflow: ellipsis; min-width: 10px; diff --git a/css/formidable_ts_prive_bloc_entete.css b/css/formidable_ts_prive_bloc_entete.css new file mode 100644 index 0000000..b2daf1b --- /dev/null +++ b/css/formidable_ts_prive_bloc_entete.css @@ -0,0 +1,34 @@ +/** Le bloc d'action et d'aide**/ +.formidable_ts-preambule { + display:flex; + justify-content:space-around; +} +.formidable_ts-preambule > *{ + width:45%; + max-width:1024px; + height:min-content; +} +.formidable_ts-preambule .aide { + padding:1ex; +} +.formidable_ts-preambule .aide p { + padding:0px; + margin:0px; +} +.formidable_ts-preambule .boutons{ + text-align:left; +} +.formidable_ts-preambule .boutons label { + padding:4px; +} +.formidable_ts #columnSelectorButton{ + display:inline-block; +} +.formidable_ts #columnSelector { + display: flex; + flex-wrap:wrap; +} +.formidable_ts #columnSelector label { + width:50%; + padding:0px; +} diff --git a/css/formidable_tablesorter_prive_layout_page.css b/css/formidable_ts_prive_layout_page.css similarity index 52% rename from css/formidable_tablesorter_prive_layout_page.css rename to css/formidable_ts_prive_layout_page.css index b77129e..4524ce5 100644 --- a/css/formidable_tablesorter_prive_layout_page.css +++ b/css/formidable_ts_prive_layout_page.css @@ -2,15 +2,15 @@ body { x-overflow:hidden; } -.formidable_tablesorter .largeur { +.formidable_ts .largeur { width:auto; margin-left:1em; margin-right:1em; } -.formidable_tablesorter #conteneur, .formidable_tablesorter #contenu{ +.formidable_ts #conteneur, .formidable_ts #contenu{ width:100%; } -.formidable_tablesorter #navigation { +.formidable_ts #navigation { display:none; } diff --git a/formidable_ts_administrations.php b/formidable_ts_administrations.php index 3d58e9a..2859ed4 100644 --- a/formidable_ts_administrations.php +++ b/formidable_ts_administrations.php @@ -42,9 +42,9 @@ function formidable_ts_configurer_crayons() { ecrire_config('crayons/espaceprive', 'on'); $exec_autorise = lire_config('crayons/exec_autorise'); if (!$exec_autorise) { - ecrire_config('crayons/exec_autorise', 'formidable_tablesorter'); - } elseif ($exec_autorise !== '*' and strpos($exec_autorise, 'formidable_tablesorter') === false) { - ecrire_config('crayons/exec_autorise', $exec_autorise.',formidable_tablesorter'); + ecrire_config('crayons/exec_autorise', 'formidable_ts'); + } elseif ($exec_autorise !== '*' and strpos($exec_autorise, 'formidable_ts') === false) { + ecrire_config('crayons/exec_autorise', $exec_autorise.',formidable_ts'); } } diff --git a/formidable_ts_pipelines.php b/formidable_ts_pipelines.php index a87c6d5..832201f 100644 --- a/formidable_ts_pipelines.php +++ b/formidable_ts_pipelines.php @@ -21,7 +21,7 @@ function formidable_ts_affiche_gauche($flux) { $id_formulaire = sql_getfetsel('id_formulaire','spip_formulaires_reponses','id_formulaires_reponse='.$args['id_formulaires_reponse']); } $boite_fermer = boite_fermer(); - $url = parametre_url(generer_url_ecrire('formidable_tablesorter'),'id_formulaire',$id_formulaire); + $url = parametre_url(generer_url_ecrire('formidable_ts'),'id_formulaire',$id_formulaire); $url = parametre_url($url, 'statut', 'publie'); $lien = icone_horizontale(_T('formidable_ts:tableau_reponses'), $url, 'formulaire-reponses-24'); $flux['data'] = str_replace($boite_fermer,"$lien\n\r$boite_fermer", $flux['data']); diff --git a/inclure/formidable_tablesorter_preambule.html b/inclure/formidable_tablesorter_preambule.html deleted file mode 100644 index 2ea0328..0000000 --- a/inclure/formidable_tablesorter_preambule.html +++ /dev/null @@ -1,6 +0,0 @@ -
- #INCLURE{fond=inclure/formidable_tablesorter_boutons,total} -
- <:formidable_ts:aide|propre:> -
-
diff --git a/inclure/formidable_tablesorter_boutons.html b/inclure/formidable_ts_boutons.html similarity index 100% rename from inclure/formidable_tablesorter_boutons.html rename to inclure/formidable_ts_boutons.html diff --git a/inclure/formidable_tablesorter_entete.html b/inclure/formidable_ts_entete.html similarity index 76% rename from inclure/formidable_tablesorter_entete.html rename to inclure/formidable_ts_entete.html index ab75487..02e6abe 100644 --- a/inclure/formidable_tablesorter_entete.html +++ b/inclure/formidable_ts_entete.html @@ -1,5 +1,5 @@ ] [] [] -[] +[] -[] -[(#ENV{css_prive_layout_page}|=={oui}|oui)[]] -[(#ENV{css_prive_bloc_entete}|=={oui}|oui)[]] +[] +[(#ENV{css_prive_layout_page}|=={oui}|oui)[]] +[(#ENV{css_prive_bloc_entete}|=={oui}|oui)[]] diff --git a/inclure/formidable_tablesorter-filtres.html b/inclure/formidable_ts_filtres.html similarity index 100% rename from inclure/formidable_tablesorter-filtres.html rename to inclure/formidable_ts_filtres.html diff --git a/inclure/formidable_ts_preambule.html b/inclure/formidable_ts_preambule.html new file mode 100644 index 0000000..c565f79 --- /dev/null +++ b/inclure/formidable_ts_preambule.html @@ -0,0 +1,6 @@ +
+ #INCLURE{fond=inclure/formidable_ts_boutons,total} +
+ <:formidable_ts:aide|propre:> +
+
diff --git a/javascript/formidable_tablesorter.js b/javascript/formidable_ts.js similarity index 96% rename from javascript/formidable_tablesorter.js rename to javascript/formidable_ts.js index 3f7e038..fd47895 100644 --- a/javascript/formidable_tablesorter.js +++ b/javascript/formidable_ts.js @@ -26,9 +26,9 @@ $(function() { filter_saveFilters : true, output_separator: 'array', output_delivery: 'download', - stickyHeaders_xScroll : '.formidable_tablesorter-wrapper', + stickyHeaders_xScroll : '.formidable_ts-wrapper', output_callback: function(config, data, url) { - return call_formidable_tablesorter_export(config, data, url); + return call_formidable_ts_export(config, data, url); }, resizable_addLastColumn: true } @@ -99,8 +99,8 @@ $.tablesorter.defaults.textExtraction = function(node, table, cellIndex){ return $(node).attr('data-sort-value') || $(node).text(); } /** Fonctions d'export tableur **/ -function call_formidable_tablesorter_export(config, data, url) { - var form = $('
').attr('action', url_action_formidable_tablesorter_export).attr('method', 'post'); +function call_formidable_ts_export(config, data, url) { + var form = $('
').attr('action', url_action_formidable_ts_export).attr('method', 'post'); form.append($("").attr('type', 'hidden').attr('name', 'data').attr('value', data)); form.append($("").attr('type', 'hidden').attr('name', 'type_export').attr('value', type_export)); form.append($("").attr('type', 'hidden').attr('name', 'filename').attr('value', filename)); @@ -154,14 +154,14 @@ function formidable_ts_post_reorder_set_sorting() { // Retrouver le tri sortList = $.tablesorter.storage(formidable_ts, 'tablesorter-savesort')['sortList']; formidable_ts.trigger('sortReset'); - sortList = formidable_tablesorter_reorder_sortList_update_position(sortList); + sortList = formidable_ts_reorder_sortList_update_position(sortList); formidable_ts.trigger('sorton', [sortList]); } // Prend une sortList // La parcourt et la modifie de manière à donner le bon index suivant le nouvel ordre post-déplacement de colonne // Pour chaque entrée, trouve la bonne position avec nouveal indexation -function formidable_tablesorter_reorder_sortList_update_position(sortList) { +function formidable_ts_reorder_sortList_update_position(sortList) { $(sortList).each(function(key, value) { console.log(value); selector = '.tablesorter-ignoreRow th[data-column='+value[0]+']'; diff --git a/lang/formidable_ts_fr.php b/lang/formidable_ts_fr.php index e5b5898..91098a9 100644 --- a/lang/formidable_ts_fr.php +++ b/lang/formidable_ts_fr.php @@ -1,6 +1,6 @@ - + #SET{saisies,#SAISIES|unserialize} #SET{saisies_finales,#GET{saisies}|saisies_lister_finales} #SET{cextras,#VAL{spip_formulaires_reponses}|appliquer_filtre{champs_extras_objet}|sinon{#LISTE}} [(#ENV{choix_statut}|=={oui}|oui) - + ] - -
- + +
+
diff --git a/modeles/formidable_tablesorter_fonctions.php b/modeles/formidable_ts_fonctions.php similarity index 100% rename from modeles/formidable_tablesorter_fonctions.php rename to modeles/formidable_ts_fonctions.php diff --git a/prive/squelettes/contenu/formidable_tablesorter.html b/prive/squelettes/contenu/formidable_ts.html similarity index 64% rename from prive/squelettes/contenu/formidable_tablesorter.html rename to prive/squelettes/contenu/formidable_ts.html index b592371..3e903c2 100644 --- a/prive/squelettes/contenu/formidable_tablesorter.html +++ b/prive/squelettes/contenu/formidable_ts.html @@ -3,5 +3,5 @@

#TITRE

- + diff --git a/prive/squelettes/hierarchie/formidable_tablesorter.html b/prive/squelettes/hierarchie/formidable_ts.html similarity index 100% rename from prive/squelettes/hierarchie/formidable_tablesorter.html rename to prive/squelettes/hierarchie/formidable_ts.html diff --git a/prive/squelettes/top/formidable_tablesorter.html b/prive/squelettes/top/formidable_ts.html similarity index 100% rename from prive/squelettes/top/formidable_tablesorter.html rename to prive/squelettes/top/formidable_ts.html
#TITRE