maj de la doc

This commit is contained in:
Christophe 2020-05-20 14:13:14 +02:00
parent decadb5f1e
commit bbf9bfb55e
3 changed files with 14 additions and 21 deletions

View file

@ -7,18 +7,25 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
1. Charger l'inclure (2 args possibles) 1. Charger l'inclure (2 args possibles)
```html ```html
<INCLURE{fond=inclure/gamutable,env}> <INCLURE{fond=inclure/gamutable,env}>
Ou
<INCLURE{fond=inclure/gamutable,env,tparpage=[15,25,50,'Tous']}> Ou avec toutes les options facultatives
Et / Ou
<INCLURE{fond=inclure/gamutable,env,apiuri=spip.php?page=json_gamutable.json}> <INCLURE{fond=inclure/gamutable,
apiuri="spip.php?page=json_souscripteurs.json",
tparpage=[15,25,50,'Tous'],
champcsv="search",
delimitercsv=";",
namecsv="souscripteurs.csv",
env
}>
``` ```
2. Surcharcher `json_gamutable.json.html` en suivant son modele 3. Surcharcher `json_gamutable.json.html` en suivant son modele
> * pour le header c'est de la forme : "champ":"label" > * pour le header c'est de la forme : "champ":"label"
> >
> * **IMPORTANT** pour le content du json, il que le cle de la KEY de la table soit "id" et non pas "id_souscription" > * **IMPORTANT** pour le content du json, il que le cle de la KEY de la table soit "id" et non pas "id_souscription"
> >
> * pour les champs date, pour avoir l'ordre de la col, il faut le format : dd/mm/yyyy ou dd/mm/yy > * pour les champs date, pour avoir l'ordre de la col, il faut le format : dd/mm/yyyy ou dd/mm/yy
3. Pour utliser **les actions** : 4. Pour utliser **les actions** :
```html ```html
[(#SET{statut, [(#SET{statut,
#SET{args,#ID_SOUSCRIPTION|concat{-}|concat{#STATUT}} #SET{args,#ID_SOUSCRIPTION|concat{-}|concat{#STATUT}}

View file

@ -105,10 +105,6 @@ function exporterCSV(json, delimitercsv, name) {
} else { } else {
csv = Papa.unparse(json); csv = Papa.unparse(json);
} }
//json.forEach((l) => {
//csv += l.join(delimitercsv);
//csv += '\r\n';
//});
//Download the file as CSV //Download the file as CSV
let link = document.createElement('a'); let link = document.createElement('a');
link.setAttribute('href', 'data:text/csv;charset=utf-8,%EF%BB%BF' + encodeURIComponent(csv)); link.setAttribute('href', 'data:text/csv;charset=utf-8,%EF%BB%BF' + encodeURIComponent(csv));
@ -131,9 +127,6 @@ let monTableau = {
type: String, type: String,
required: true, required: true,
}, },
objet: {
type: String,
},
champcsv: { champcsv: {
type: String, type: String,
}, },

View file

@ -138,11 +138,7 @@ function exporterCSV(json, delimitercsv, name) {
}); });
} else { } else {
csv = Papa.unparse(json); csv = Papa.unparse(json);
} //json.forEach((l) => { } //Download the file as CSV
//csv += l.join(delimitercsv);
//csv += '\r\n';
//});
//Download the file as CSV
var link = document.createElement('a'); var link = document.createElement('a');
@ -166,9 +162,6 @@ var monTableau = {
type: String, type: String,
required: true required: true
}, },
objet: {
type: String
},
champcsv: { champcsv: {
type: String type: String
}, },