From dbdca11103edc7104711010a016a4ef0f4a57229 Mon Sep 17 00:00:00 2001 From: tofulm Date: Mon, 30 May 2022 10:53:09 +0200 Subject: [PATCH 1/4] re gulp --- js/gamutable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/gamutable.js b/js/gamutable.js index 7b73d71..2c85169 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -20,7 +20,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } jQuery(function () { $('#app').on('click', '.url_action', function (e) { From 686acc845216a6e3c4a25bb6fe1484de4b3620ec Mon Sep 17 00:00:00 2001 From: tofulm Date: Mon, 30 May 2022 11:36:56 +0200 Subject: [PATCH 2/4] maj de caniuse --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e1c250..c4a4647 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2680,9 +2680,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==", + "version": "1.0.30001344", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz", + "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==", "funding": [ { "type": "opencollective", @@ -11338,9 +11338,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==" + "version": "1.0.30001344", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz", + "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==" }, "caseless": { "version": "0.12.0", From d924e4ad9a0a236a0d690435efaae28208b93866 Mon Sep 17 00:00:00 2001 From: cy_altern Date: Tue, 31 May 2022 12:25:00 +0200 Subject: [PATCH 3/4] =?UTF-8?q?compl=C3=A9ment=20de=20doc=20:=20les=20cray?= =?UTF-8?q?ons=20et=20les=20filtrages=20par=20URL=20d'appel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 73 +++++++++++++++++++++++++++++++++++-------------- js/gamutable.js | 2 +- 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 844614b..05b4708 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev } ``` - ## Utiliser les actions : ```html [(#SET{statut, @@ -90,6 +89,25 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev ## Utiliser les crayons : +```json +[{ +"header":{ +"id": "ID", +"activite": "Activité", +"massif": "Massif", +"sommet": "Sommet", +"voie": "Voie", +"participants_max": "Participants max", +"tarif_prive": "Prix" +}, +"crayons":{ + "tarif_prive" : "activite" +} +``` +Dans cet exemple : +- `activite` est le raccourci du nom de la table (spip_activites) +- `tarif_prive` est **obligatoirement** l'intitulé du champs dans cette table (si besoin il faut modifier la clé du champ...) + ### Caches l'invalidation du cache ne se fait que pour les objets publiés @@ -113,24 +131,24 @@ Il faut surcharger cette autorisation : autoriser_crayonner_dist() `inc/crayons` ### @Deprecated => integre par default dans la 3.4.2 pour tous les objets ->- il faut utiliser le pipeline `crayons_vue_affichage_final` ->```php ->/** -> * injection du reload de vuejs pour les crayons de l'objet souscription -> * -> */ ->function prefixPlugin_crayons_vue_affichage_final($flux){ -> if ($flux['args']['type'] === 'souscription') { -> $id = $flux['args']['id']; -> if ($id = intval($id)) { -> $flux['data'] .= ' '; -> } else { -> $flux['data'] .= ' '; -> } -> } -> return $flux; ->} ->``` +- il faut utiliser le pipeline `crayons_vue_affichage_final` +```php +/** + * injection du reload de vuejs pour les crayons de l'objet souscription + * + */ +function prefixPlugin_crayons_vue_affichage_final($flux){ + if ($flux['args']['type'] === 'souscription') { + $id = $flux['args']['id']; + if ($id = intval($id)) { + $flux['data'] .= ' '; + } else { + $flux['data'] .= ' '; + } + } + return $flux; +} +``` ## Utiliser une mediabox ou modalbox : @@ -185,5 +203,18 @@ Il faut surcharger cette autorisation : autoriser_crayonner_dist() `inc/crayons` }> ``` - ## Liens ->https://unpkg.com/browse/vue-next-select@2.10.4/ + + + ## URLs avec filtrage : +Concatener le filtrage dans l'url d'appel du json : +```html + http://guides.spip/?page=grille_tarifs&activite=Alpinisme + ``` + ou + ```html +2021 +``` + + + ## Refs +https://unpkg.com/browse/vue-next-select@2.10.4/ diff --git a/js/gamutable.js b/js/gamutable.js index 2c85169..7b73d71 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -20,7 +20,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } jQuery(function () { $('#app').on('click', '.url_action', function (e) { From 548dc9243c2a2a8b4be8d8160a024374446104dd Mon Sep 17 00:00:00 2001 From: tofulm Date: Tue, 31 May 2022 17:44:10 +0200 Subject: [PATCH 4/4] correction doc --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 05b4708..629abbd 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev urlvuebloc=spip.php?page=mon_bloc_type_html, vueblocdefaut='bloc ou tableau', // par defaut tableau namecsv="souscripteurs.csv", - url_sort_asc="#CHEMIN{...}" - url_sort_desc="#CHEMIN{...}" - stockage="indexeddb" // par defaut : localstorage - includespip="#ENV{includespip}" // pour ajouter un code html dans la ligne au dessus du tableau - nomBlocAjaxReload="nom bloc a recharger à la fin du chargement des donnees" + url_sort_asc="#CHEMIN{...}", + url_sort_desc="#CHEMIN{...}", + stockage="indexeddb", // par defaut : localstorage + includespip="#ENV{includespip}", // pour ajouter un code html dans la ligne au dessus du tableau + nomBlocAjaxReload="nom bloc a recharger à la fin du chargement des donnees", + filtrerselect=[(#ENV{filtrerselect})], env - filtreselect='[(#ENV{filtrerselect})]' }> [(#SET{filtrerselect,#ARRAY{