From 1e3ba0b0ff3d5cbd2f96e0f112ffbb79345c55e1 Mon Sep 17 00:00:00 2001 From: Steve Bourgeois Date: Thu, 24 Oct 2024 06:07:04 -0400 Subject: [PATCH] Fixed typo in implementation Plan --- .../datatable-utilities-doc-en.html" | 95 ++++++++++++++++++ .../datatable-utilities-doc-fr.html" | 96 +++++++++++++++++++ .../index-en.html" | 91 +++++++++++++++--- .../index-fr.html" | 89 ++++++++++++++--- .../js/wb-pspc-datatable-utility.js" | 11 ++- .../2024-10-datatable-utilities/meta.md" | 8 +- 6 files changed, 360 insertions(+), 30 deletions(-) create mode 100644 "m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-en.html" create mode 100644 "m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-fr.html" rename "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-eng.html" => "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-en.html" (75%) rename "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fra.html" => "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fr.html" (75%) diff --git "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-en.html" "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-en.html" new file mode 100644 index 000000000..b683fa9a3 --- /dev/null +++ "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-en.html" @@ -0,0 +1,95 @@ +--- +title: DataTable Utilities - Documentation +language: en +description: Utility to Manipulate JSON Data. +tag: DataTable +altLangPage: datatable-utilities-doc-fr.html +dateModified: 2024-11-01 +--- + +
+ +
+

Configuration options

+ +

Document the public configuration options that can be used by implementers or developers.

+

Enable the plugin for the Target Table by adding wb-tables-utility to the <table> element <table class="table wb-tables wb-tables-utility"> data-wb-tables-utility="{...}"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (column-name, column-name-url) + + + + + + +
OptionDescriptionHow to configureValues
debugPrint Debug messages to the consoledata-wb-tables-utility="{&quot;debug&quot;:true}" +
+
false (default)
+
Suppress Printing of debug messages.
+
true
+
Show debug messages to the console.
+
+
filteredsumColumn Totals to reflect Filtered DataTable Datadata-wb-tables-utility="{&quot;filteredsum&quot;:false}" +
+
true (default):
+
As Data is Filtered adjust Totals to match filtered Data.
+
false:
+
Show Grand Total Regardless of data filtered.
+
+
wb-col-sumWhen applied to a column, a column footer total is calcualted"columnDefs": [{ "className": "wb-col-sum", "targets": [3]}] + wb-col-sum +
wb-col-moneyWhen this class is applied to a column, the data is manipulated to reflect currency with $"columnDefs": [{ "className": "wb-col-money", "targets": [3]}] + wb-col-money +
wb-col-cur-thousandWhen this class is applied to a column, the data is manipulated to reflect currency without $"columnDefs": [{ "className": "wb-col-cur-thousand", "targets": [3]}] + wb-col-cur-thousand +
wb-col-mailtoWhen this class is applied to a column, the data is searched with an email partern, and when found are wrapped with <a href="mailto:...">...</a> to make it a clikcable link."columnDefs": [{ "className": "wb-col-mailto", "targets": [3]}] + wb-col-mailto +
wb-col-urlWhen this class is applied to a column, dataTable Utilites looks for a second column with the same name as this column that is ending with -url + and the 2 are stiched into a single column wrapped with <a href="column-name-url">column-name</a> to make it a clikcable link."columnDefs": [{ "className": "wb-col-url", "targets": [3]}] + wb-col-url +
\ No newline at end of file diff --git "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-fr.html" "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-fr.html" new file mode 100644 index 000000000..5ea8da78a --- /dev/null +++ "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/datatable-utilities-doc-fr.html" @@ -0,0 +1,96 @@ +--- +title: DataTable Utilities - Documentation +language: fr +description: Utility to Manipulate JSON Data. +tag: DataTable +altLangPage: datatable-utilities-doc-fr.html +dateModified: 2024-11-01 +--- + +
+ +
+

Configuration options

+ +

Document the public configuration options that can be used by implementers or developers.

+ +

Enable the plugin for the Target Table by adding wb-tables-utility to the <table> element <table class="table wb-tables wb-tables-utility"> data-wb-tables-utility="{...}"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (column-name, column-name-url) + + + + + + +
OptionDescriptionHow to configureValues
debugPrint Debug messages to the consoledata-wb-tables-utility="{&quot;debug&quot;:true}" +
+
false (default)
+
Suppress Printing of debug messages.
+
true
+
Show debug messages to the console.
+
+
filteredsumColumn Totals to reflect Filtered DataTable Datadata-wb-tables-utility="{&quot;filteredsum&quot;:false}" +
+
true (default):
+
As Data is Filtered adjust Totals to match filtered Data.
+
false:
+
Show Grand Total Regardless of data filtered.
+
+
wb-col-sumWhen applied to a column, a column footer total is calcualted"columnDefs": [{ "className": "wb-col-sum", "targets": [3]}] + wb-col-sum +
wb-col-moneyWhen this class is applied to a column, the data is manipulated to reflect currency with $"columnDefs": [{ "className": "wb-col-money", "targets": [3]}] + wb-col-money +
wb-col-cur-thousandWhen this class is applied to a column, the data is manipulated to reflect currency without $"columnDefs": [{ "className": "wb-col-cur-thousand", "targets": [3]}] + wb-col-cur-thousand +
wb-col-mailtoWhen this class is applied to a column, the data is searched with an email partern, and when found are wrapped with <a href="mailto:...">...</a> to make it a clikcable link."columnDefs": [{ "className": "wb-col-mailto", "targets": [3]}] + wb-col-mailto +
wb-col-urlWhen this class is applied to a column, dataTable Utilites looks for a second column with the same name as this column that is ending with -url + and the 2 are stiched into a single column wrapped with <a href="column-name-url">column-name</a> to make it a clikcable link."columnDefs": [{ "className": "wb-col-url", "targets": [3]}] + wb-col-url +
\ No newline at end of file diff --git "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-eng.html" "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-en.html" similarity index 75% rename from "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-eng.html" rename to "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-en.html" index cb9c99122..79d02ffc2 100644 --- "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-eng.html" +++ "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-en.html" @@ -1,9 +1,9 @@ --- title: DataTable Utilities -dateModified: 2024-10-01 +dateModified: 2024-10-31 description: "Utilities that allow Columns to be MONEY Formatted, Emails wrapped with mailto, url's to be clickable and Footer totals that can be affected by filtered Data Or not." lang: en -altLangPage: "index-fra.html" +altLangPage: "index-fr.html" script: [ "js/wb-pspc-datatable-utility.js" ] css: [ "css/wb-pspc-datatable-utility.css"] --- @@ -30,7 +30,23 @@

GCWeb implementation plan

Sponsor: PSPC - {{ implPlan.sponsor }}

-

Control Table with Raw Data

+ + +

Control Table with Raw Data

+ + + + + + + + + + +
+ Table 3: Second Example of JSON Data Manipulation +
DepartmentContact EmailCustom studyReg#Contract value
+
+ +

Table Footer With Static Totals

.wb-col-sum class on the column to perform column Total

Add a Placehoder <tfoot> at the bottom of the Table.

@@ -135,7 +200,7 @@

Code

Pass false via filteredsum to the plugin data-wb-tables-utility="{"filteredsum":false}" as the default is true

-    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t3"
+    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t4"
     data-wb-tables-utility="{"filteredsum":false}"
             data-wb-tables='{ "ajax":"data/datatable-utility.json",
                             "columns": [{ "data": "DepartmentEN" },
@@ -152,7 +217,7 @@ 

Code

- Code { "className": "text-right wb-col-money wb-col-sum", "targets": [4] }], "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ]}'> @@ -186,7 +251,7 @@

Code

- Table 3: Static Totals in Table Footer Example + Table 4: Static Totals in Table Footer Example
-

Table Footer With Dynamic Totals updated when Filtered

+

Table Footer With Dynamic Totals updated when Filtered

.wb-col-sum class on the column to perform column Total

Add a Placehoder <tfoot> at the bottom of the Table.

@@ -203,7 +268,7 @@

Table Footer With Dynamic Totals updated when Filtered

Code

-    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t4"
+    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t5"
             data-wb-tables='{ "ajax":"data/datatable-utility.json",
                             "columns": [{ "data": "DepartmentEN" },
                                         { "data": "ContactEmail" },
@@ -219,7 +284,7 @@ 

Code

- Code { "className": "text-right wb-col-money wb-col-sum", "targets": [4] }], "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ]}'> diff --git "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fra.html" "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fr.html" similarity index 75% rename from "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fra.html" rename to "m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fr.html" index 97a44c2a8..72d519f64 100644 --- "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fra.html" +++ "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/index-fr.html" @@ -1,9 +1,9 @@ --- title: Utilitaire DataTable -dateModified: 2024-10-01 +dateModified: 2024-10-31 description: "Utilities that allow Columns to be MONEY Formatted, Emails wrapped with mailto, url's to be clickable and Footer totals that can be affected by filtered Data Or not." lang: fr -altLangPage: "index-eng.html" +altLangPage: "index-en.html" script: [ "js/wb-pspc-datatable-utility.js" ] css: [ "css/wb-pspc-datatable-utility.css" ] --- @@ -30,7 +30,23 @@

Plan de mise en œuvre de GCWeb

Commanditaire : SPAC - {{ implPlan.sponsor }}

-

Table de contrôle avec données brute

+ + +

Table de contrôle avec données brute

- Table 4: Dynamic Totals in Table Footer Example + Table 5: Dynamic Totals in Table Footer Example
+ +
+    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t3"
+            data-wb-tables='{ "ajax":"data/datatable-utility.json",
+                            "columns": [{ "data": "DepartmentFR" },
+                                        { "data": "ContactEmail" },
+                                        { "data": "Custom study titleFR" },
+                                        { "data": "Registration number" },
+                                        { "data": "Contract value" }],
+                                    "columnDefs": [{ "className": "text-left", "targets": [0]},
+                                            { "className": "text-left wb-col-mailto", "targets": [1] },
+                                            { "className": "text-left wb-col-url", "targets": [2] },
+                                            { "className": "text-left", "targets": [3] },
+                                            { "className": "text-right wb-col-money", "targets": [4] }],
+                                                "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ]}'>
+
+ +
+
+ + + + + + + + + + +
+ Tableau 3 : Deuxième exemple de manipulation des données JSON +
MinistèreCourrielTitre de l’étude multi-intérêtsReg#Valeur des contrats
+
+ +

Pied de page de table avec totaux statiques

.wb-col-sum classe sur la colonne pour effectuer le total de la colonne.

Ajouter un espace réservé <tfoot> en bas de la table.

@@ -136,7 +201,7 @@

Code

Définissez le paramètre filteredsum a « false » dans le plugiciel data-wb-tables-utility="{\"filteredsum\":false}", car la valeur par défaut est « true ».

-    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t3"
+    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t4"
             data-wb-tables-utility="{"filteredsum":false}"
             data-wb-tables='{ "ajax":"data/datatable-utility.json",
                             "columns": [{ "data": "DepartmentFR" },
@@ -153,7 +218,7 @@ 

Code

- Code { "className": "text-right wb-col-money wb-col-sum", "targets": [4] }], "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ]}'> @@ -187,7 +252,7 @@

Code

- Tableau 3 : Exemple de totaux statiques dans le pied de page de table + Tableau 4 : Exemple de totaux statiques dans le pied de page de table
-

Pied de page de table avec totaux dynamiques mis à jour lors du filtrage

+

Pied de page de table avec totaux dynamiques mis à jour lors du filtrage

.wb-col-sum classe sur la colonne pour effectuer le total de la colonne.

Ajouter un espace réservé <tfoot> en bas de la table.

@@ -204,7 +269,7 @@

Pied de page de table avec totaux dynamiques mis à jour lors du filtrageCode

-    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t4"
+    <table class="wb-tables table table-striped table-hover table-condensed small wb-tables-utility" id="t5"
             data-wb-tables='{ "ajax":"data/datatable-utility.json",
                             "columns": [{ "data": "DepartmentFR" },
                                         { "data": "ContactEmail" },
@@ -220,7 +285,7 @@ 

Code

- Code { "className": "text-right wb-col-money wb-col-sum", "targets": [4] }], "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ]}'> diff --git "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/js/wb-pspc-datatable-utility.js" "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/js/wb-pspc-datatable-utility.js" index ddbeea0ec..9a74790d5 100644 --- "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/js/wb-pspc-datatable-utility.js" +++ "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/js/wb-pspc-datatable-utility.js" @@ -7,6 +7,12 @@ * * * + * Version History: 1.1.1 + * Implement Wet-Boew Team recomendations Post Pull Request + * 1. Suggestion: create a separate documentation page for all the options instead of having them in the JS file + * 2. Please add an implementation plan item: "Produce accessibility conformance report" + * 3. I don't see a working example for the following option: wb-col-cur-thousand. + * * Version History: 1.1.0 * Implement Wet-Boew Team recomendations * 1. Remove formatting on Totals in favor of css @@ -42,7 +48,7 @@ * { "className": "wb-col-sum wb-col-money text-right", "targets": [2] }], * "lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ]}'> * - * Paramaters: searchApplied Total of Filtered Results Only or All if nothing was filtered + * Paramaters: filteredsum Total of Filtered Results Only or All if nothing was filtered * Default Value: true * * wb-col-sum Class added to the columnDefs option of data-wb-tables to let the plugin know that this column needs to be totaled @@ -61,7 +67,6 @@ ******************************************************************************************** */ - (function ($, window, wb) { 'use strict'; @@ -176,7 +181,7 @@ }); } - debugMsg('PSPC: wb-pspc-datatable-utility plugin Version 1.1.0 Initialized'); + debugMsg('PSPC: wb-pspc-datatable-utility plugin Version 1.1.1 Initialized'); debugMsg(data); } diff --git "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/meta.md" "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/meta.md" index 812cb1d0d..53bc39127 100644 --- "a/m\303\251li-m\303\251lo/2024-10-datatable-utilities/meta.md" +++ "b/m\303\251li-m\303\251lo/2024-10-datatable-utilities/meta.md" @@ -38,8 +38,10 @@ implementationPlan: what: "Fix Identified problems and accesibility issues Completed" - due: 2024-10-24 what: "Submit Pull Request Completed" + - due: 2025-11-30 + what: "Produce accessibility conformance report Todo" - due: 2025-06-30 - what: Work toward a provisional plugin In Progress" + what: "Work toward a provisional plugin In Progress" implementationPlanFR: - due: 2024-09-24 @@ -56,8 +58,10 @@ implementationPlanFR: what: "Corriger les problèmes identifiés et les problèmes d'accessibilité Completé" - due: 2024-10-24 what: "Soumettre la demandes de tirage Completé" + - due: 2025-11-30 + what: "Produce accessibility conformance report A faire" - due: 2025-06-30 - what: "Travailler vers un plugiciel provisoire En cours"" + what: "Travailler vers un plugiciel provisoire En cours" todos: - Add Other Data Manipulation Classes Maybe (percentage)?
- Table 4 : Exemple de totaux dynamiques dans le pied de page + Table 5 : Exemple de totaux dynamiques dans le pied de page