Compare commits
No commits in common. "master" and "test_cookie_version" have entirely different histories.
master
...
test_cooki
8 changed files with 150 additions and 184 deletions
14
README.md
14
README.md
|
@ -76,8 +76,7 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
|
|||
## les filtrages par url sont :
|
||||
|
||||
- &trier=champ1|asc => OK
|
||||
- &filtrer=champ1|valeur1,champ2|valeur2 => OK
|
||||
- &filtrer=statut|publie,statut|prop => OK
|
||||
- &filtrer=champ1|valeur1 => OK
|
||||
- &afficher=50 => OK
|
||||
- &rechercher=toto => OK
|
||||
|
||||
|
@ -159,15 +158,6 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
|
|||
- par défaut `gamutableUn` si le bouton est dans `gamutableUn`, `gamutableDeux` si il est dans `gamutableDeux`
|
||||
- possibilité d'ajouter à la balise `<a>` qui déclenche l'action un `data-treload` = `1` | `2` | `12` pour forcer le rechargement de l'un ou l'autre ou les deux gamutables
|
||||
|
||||
## Ajouter une ligne d'en-tête avec colspan
|
||||
|
||||
```json
|
||||
"header_top":{
|
||||
"Factures": {"class":"facture", "colspan" :7},
|
||||
"MONTANT FACTURE": {"class":"montant_facture", "colspan" :3}
|
||||
},
|
||||
```
|
||||
|
||||
## Utiliser les crayons :
|
||||
|
||||
```json
|
||||
|
@ -352,7 +342,7 @@ ou
|
|||
|
||||
## cellule checkbox
|
||||
|
||||
Il est possible d'ajouter pour une colonne des checkbox qui declencheront soit une action, soit l'appel d'un formulaire.
|
||||
Il est possible d'ajouter pour une colonne des checbox qui declencheront soit une action, soit l'appel d'un formulaire.
|
||||
|
||||
1. il faut ajouter dans le header la cle checkbox (cf ex) pour definir l'url du payload de type action ou page= (formulaire)
|
||||
avec comme nom de premier parametre : data qui sera transformer en php via :
|
||||
|
|
|
@ -118,13 +118,6 @@ th .vue-select {
|
|||
table-layout: auto;
|
||||
}
|
||||
|
||||
.gamutable table .header_top th {
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
}
|
||||
.gamutable table .header_top th, .gamutable table th.span_g {
|
||||
border-left: 1px solid rgb(184, 184, 184);
|
||||
}
|
||||
.gamutable table thead {
|
||||
border: 1px solid rgb(119, 119, 119);
|
||||
}
|
||||
|
@ -171,7 +164,7 @@ th .vue-select {
|
|||
color: rgb(220, 53, 69);
|
||||
}
|
||||
|
||||
.gamutable table.table tbody tr:hover {
|
||||
.gamutable table tbody tr:hover {
|
||||
background-color: rgba(179, 209, 67, 0.27);
|
||||
}
|
||||
|
||||
|
@ -203,8 +196,7 @@ td.icone>* {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.gamutable .url_action:not(.sans_css),
|
||||
.gamutable .btn_action:not(.sans_css) {
|
||||
.gamutable .url_action:not(.sans_css) {
|
||||
padding: 0.2rem;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
|
@ -212,19 +204,10 @@ td.icone>* {
|
|||
border: 1px solid #cecece;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.gamutable .url_action:hover,
|
||||
.gamutable .btn_action:hover {
|
||||
|
||||
.gamutable .url_action:hover {
|
||||
background-color: #cecece;
|
||||
}
|
||||
.gamutable .filtreColonne input.check_tout {
|
||||
margin-right: 1rem;
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
.gamutable input.check_action {
|
||||
height: 2.5rem;
|
||||
width: 2.5rem;
|
||||
}
|
||||
|
||||
td.icone i {
|
||||
font-size: 1.8rem;
|
||||
|
|
2
dist/.vite/manifest.json
vendored
2
dist/.vite/manifest.json
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"gamutable.js": {
|
||||
"file": "assets/gamutable-DbH3C0Nx.js",
|
||||
"file": "assets/gamutable-Bcxw5aDx.js",
|
||||
"name": "gamutable",
|
||||
"src": "gamutable.js",
|
||||
"isEntry": true
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,114 @@
|
|||
#CACHE{0}
|
||||
[(#VAL{gamutable.js}|vite)]
|
||||
#INCLURE{fond=font/police.css}
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="[(#CHEMIN{css/gamutable.css}|compacte|timestamp)]"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
title="no title"
|
||||
charset="utf-8"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="[(#CHEMIN{css/vue-next-select.css}|compacte|timestamp)]"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
title="no title"
|
||||
charset="utf-8"
|
||||
/>
|
||||
|
||||
[(#SET{sort_asc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_asc]})]
|
||||
[(#SET{sort_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})]
|
||||
[(#SET{pdfuri,#VAL{pdf_gamutable}|generer_url_action{"", 1}})]
|
||||
<span class="crayon gamutable-yyyy-nn"></span>
|
||||
[(#ENV{fichierVueBloc}|oui)
|
||||
[(#SET{htmlvuebloc,#INCLURE{fond=#ENV{fichierVueBloc}}|replace{'"',"'"}})]
|
||||
]
|
||||
|
||||
[(#SET{gamutable_version_demandee,#VAL{gamutable_version_demandee}|gamutableGetGlobals{1}})]
|
||||
|
||||
<script>
|
||||
document.gamutable_version_demandee = "#GET{gamutable_version_demandee}";
|
||||
<div id="vueGamutable">
|
||||
<BOUCLE_un(CONDITION){si #ENV{apiuri}|oui}>
|
||||
<div class="container_un">
|
||||
[<span class="h2-like titregamutable">(#ENV*{titregamutable})</span>]
|
||||
<div class="gamutableUn vue-gamutable" [ id="(#ENV{id_gamutable})" ]>
|
||||
<gamu-table
|
||||
apiuri="[(#ENV{apiuri})]"
|
||||
pdfuri="#GET{pdfuri}"
|
||||
:tparpage="#ENV{tparpage, [10, 20, 50, 'Tous']}"
|
||||
:afficher="#ENV{afficher,0}"
|
||||
champcsv="#ENV{champcsv,html}"
|
||||
delimitercsv="#ENV{delimitercsv,','}"
|
||||
namecsv="#ENV{namecsv}"
|
||||
namepdf="#ENV{namepdf}"
|
||||
argpdf="#ENV{argpdf}"
|
||||
fichierpdf="#ENV{fichierpdf}"
|
||||
htmlvuebloc="[(#GET{htmlvuebloc})]"
|
||||
filtrecolmulti="#ENV{filtrecolmulti,oui}"
|
||||
nomblocajaxreload="#ENV{nomblocajaxreload}"
|
||||
stockage="#ENV{stockage,localstorage}"
|
||||
includespip="#ENV{includespip}"
|
||||
ref="montableau"
|
||||
filtrer="#ENV{rechercher}"
|
||||
:_id="[(#ENV{_id}|intval)]"
|
||||
filtreselect="[(#ENV{filtrer,#ENV{filtrerselect}})]"
|
||||
trier="[(#ENV{trier})]"
|
||||
langpdf="[(#ENV{langpdf})]"
|
||||
:id_auteur="[(#SESSION{id_auteur}|intval)]"
|
||||
:gamutable_version_demandee="#GET{gamutable_version_demandee,1}"
|
||||
></gamu-table>
|
||||
</div>
|
||||
</div>
|
||||
</BOUCLE_un>
|
||||
|
||||
<BOUCLE_deux(CONDITION){si #ENV{apiuri_deux}|oui}>
|
||||
[(#ENV{fichierVueBloc}|oui)
|
||||
[(#SET{htmlvuebloc_deux,#INCLURE{fond=#ENV{fichierVueBloc}}})]
|
||||
]
|
||||
<INCLURE{fond=inclure/separateur_gamutables,env}>
|
||||
<div class="container_deux">
|
||||
[<span class="h2-like titregamutable_deux">(#ENV*{titregamutable_deux})</span>]
|
||||
<div class="gamutableDeux vue-gamutable"[ id="(#ENV{id_gamutable_deux})"]>
|
||||
<gamu-table
|
||||
apiuri="[(#ENV{apiuri_deux})]"
|
||||
pdfuri="#GET{pdfuri}"
|
||||
:tparpage="#ENV{tparpage_deux, #ENV{tparpage, [10, 20, 50, 'Tous']}}"
|
||||
:afficher="#ENV{afficher_deux,0}"
|
||||
champcsv="[(#ENV{champcsv_deux, #ENV{champcsv,html}})]"
|
||||
delimitercsv="[(#ENV{delimitercsv_deux, #ENV{delimitercsv,','}})]"
|
||||
namecsv="[(#ENV{namecsv_deux, #ENV{namecsv}})]"
|
||||
namepdf="#ENV{namepdf_deux}"
|
||||
argpdf="#ENV{argpdf_deux}"
|
||||
fichierpdf="[(#ENV{fichierpdf_deux, #ENV{fichierpdf}})]"
|
||||
htmlvuebloc="[(#GET{htmlvuebloc_deux})]"
|
||||
filtrecolmulti="[(#ENV{filtrecolmulti_deux, #ENV{filtrecolmulti,oui}})]"
|
||||
nomblocajaxreload="#ENV{nomblocajaxreload}"
|
||||
stockage="#ENV{stockage,localstorage}"
|
||||
includespip="#ENV{includespip}"
|
||||
ref="montableau_deux"
|
||||
filtrer="#ENV{rechercher}"
|
||||
:_id="[(#ENV{_id_deux}|intval)]"
|
||||
filtreselect="[(#ENV{filtrerselect_deux})]"
|
||||
filtreselect="[(#ENV{filtrer_deux,#ENV{filtrerselect_deux}})]"
|
||||
trier="[(#ENV{trier_deux})]"
|
||||
langpdf="[(#ENV{langpdf})]"
|
||||
:id_auteur="[(#SESSION{id_auteur}|intval)]"
|
||||
:gamutable_version_demandee="#GET{gamutable_version_demandee,1}"
|
||||
></gamu-table>
|
||||
</div>
|
||||
</div>
|
||||
</BOUCLE_deux>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var nomBlocAjaxReload = "";
|
||||
</script>
|
||||
<INCLURE{fond=inclure/inc-gamutable,env}>
|
||||
|
||||
<script src="[(#CHEMIN{js/localforage.min.js}|timestamp)]" type="text/javascript"></script>
|
||||
|
||||
|
||||
[(#CONFIG{gamutable/charger_modalbox}|=={oui}|oui)
|
||||
<script src="[(#CHEMIN{js/gamubox.js}|timestamp)]" type="text/javascript"></script>
|
||||
]
|
||||
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
[(#VAL{gamutable.js}|vite)]
|
||||
#INCLURE{fond=font/police.css}
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="[(#CHEMIN{css/gamutable.css}|compacte|timestamp)]"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
title="no title"
|
||||
charset="utf-8"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="[(#CHEMIN{css/vue-next-select.css}|compacte|timestamp)]"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
title="no title"
|
||||
charset="utf-8"
|
||||
/>
|
||||
|
||||
[(#SET{sort_asc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_asc]})]
|
||||
[(#SET{sort_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})]
|
||||
[(#SET{pdfuri,#VAL{pdf_gamutable}|generer_url_action{"", 1}})]
|
||||
<span class="crayon gamutable-yyyy-nn"></span>
|
||||
[(#ENV{fichierVueBloc}|oui)
|
||||
[(#SET{htmlvuebloc,#INCLURE{fond=#ENV{fichierVueBloc}}|replace{'"',"'"}})]
|
||||
]
|
||||
|
||||
|
||||
<div id="vueGamutable">
|
||||
<BOUCLE_un(CONDITION){si #ENV{apiuri}|oui}>
|
||||
<div class="container_un">
|
||||
[<span class="h2-like titregamutable">(#ENV*{titregamutable})</span>]
|
||||
<div class="gamutableUn vue-gamutable" [ id="(#ENV{id_gamutable})" ]>
|
||||
<gamu-table
|
||||
apiuri="[(#ENV{apiuri})]"
|
||||
pdfuri="#GET{pdfuri}"
|
||||
:tparpage="#ENV{tparpage, [10, 20, 50, 'Tous']}"
|
||||
:afficher="#ENV{afficher,0}"
|
||||
champcsv="#ENV{champcsv,html}"
|
||||
delimitercsv="#ENV{delimitercsv,','}"
|
||||
namecsv="#ENV{namecsv}"
|
||||
namepdf="#ENV{namepdf}"
|
||||
argpdf="#ENV{argpdf}"
|
||||
fichierpdf="#ENV{fichierpdf}"
|
||||
htmlvuebloc="[(#GET{htmlvuebloc})]"
|
||||
filtrecolmulti="#ENV{filtrecolmulti,oui}"
|
||||
nomblocajaxreload="#ENV{nomblocajaxreload}"
|
||||
stockage="#ENV{stockage,localstorage}"
|
||||
includespip="#ENV{includespip}"
|
||||
ref="montableau"
|
||||
filtrer="#ENV{rechercher}"
|
||||
:_id="[(#ENV{_id}|intval)]"
|
||||
filtreselect="[(#ENV{filtrer,#ENV{filtrerselect}})]"
|
||||
trier="[(#ENV{trier})]"
|
||||
langpdf="[(#ENV{langpdf})]"
|
||||
:id_auteur="[(#SESSION{id_auteur}|intval)]"
|
||||
></gamu-table>
|
||||
</div>
|
||||
</div>
|
||||
</BOUCLE_un>
|
||||
|
||||
<BOUCLE_deux(CONDITION){si #ENV{apiuri_deux}|oui}>
|
||||
[(#ENV{fichierVueBloc}|oui)
|
||||
[(#SET{htmlvuebloc_deux,#INCLURE{fond=#ENV{fichierVueBloc}}})]
|
||||
]
|
||||
<INCLURE{fond=inclure/separateur_gamutables,env}>
|
||||
<div class="container_deux">
|
||||
[<span class="h2-like titregamutable_deux">(#ENV*{titregamutable_deux})</span>]
|
||||
<div class="gamutableDeux vue-gamutable"[ id="(#ENV{id_gamutable_deux})"]>
|
||||
<gamu-table
|
||||
apiuri="[(#ENV{apiuri_deux})]"
|
||||
pdfuri="#GET{pdfuri}"
|
||||
:tparpage="#ENV{tparpage_deux, #ENV{tparpage, [10, 20, 50, 'Tous']}}"
|
||||
:afficher="#ENV{afficher_deux,0}"
|
||||
champcsv="[(#ENV{champcsv_deux, #ENV{champcsv,html}})]"
|
||||
delimitercsv="[(#ENV{delimitercsv_deux, #ENV{delimitercsv,','}})]"
|
||||
namecsv="[(#ENV{namecsv_deux, #ENV{namecsv}})]"
|
||||
namepdf="#ENV{namepdf_deux}"
|
||||
argpdf="#ENV{argpdf_deux}"
|
||||
fichierpdf="[(#ENV{fichierpdf_deux, #ENV{fichierpdf}})]"
|
||||
htmlvuebloc="[(#GET{htmlvuebloc_deux})]"
|
||||
filtrecolmulti="[(#ENV{filtrecolmulti_deux, #ENV{filtrecolmulti,oui}})]"
|
||||
nomblocajaxreload="#ENV{nomblocajaxreload}"
|
||||
stockage="#ENV{stockage,localstorage}"
|
||||
includespip="#ENV{includespip}"
|
||||
ref="montableau_deux"
|
||||
filtrer="#ENV{rechercher}"
|
||||
:_id="[(#ENV{_id_deux}|intval)]"
|
||||
filtreselect="[(#ENV{filtrerselect_deux})]"
|
||||
filtreselect="[(#ENV{filtrer_deux,#ENV{filtrerselect_deux}})]"
|
||||
trier="[(#ENV{trier_deux})]"
|
||||
langpdf="[(#ENV{langpdf})]"
|
||||
:id_auteur="[(#SESSION{id_auteur}|intval)]"
|
||||
></gamu-table>
|
||||
</div>
|
||||
</div>
|
||||
</BOUCLE_deux>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var nomBlocAjaxReload = "";
|
||||
</script>
|
||||
|
||||
<script src="[(#CHEMIN{js/localforage.min.js}|timestamp)]" type="text/javascript"></script>
|
||||
|
||||
|
||||
[(#CONFIG{gamutable/charger_modalbox}|=={oui}|oui)
|
||||
<script src="[(#CHEMIN{js/gamubox.js}|timestamp)]" type="text/javascript"></script>
|
||||
]
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<paquet
|
||||
prefix="gamutable"
|
||||
categorie="outil"
|
||||
version="5.7.2"
|
||||
version="5.6.1"
|
||||
etat="test"
|
||||
compatibilite="[3.3.0;4.*]"
|
||||
logo="prive/themes/spip/images/gamutable-xx.svg"
|
||||
|
@ -21,4 +21,5 @@
|
|||
<pipeline nom="crayons_vue_affichage_final" inclure="gamutable_pipelines.php" />
|
||||
<pipeline nom="insert_head_css" inclure="gamutable_pipelines.php" />
|
||||
|
||||
|
||||
</paquet>
|
||||
|
|
|
@ -89,9 +89,9 @@
|
|||
<th v-for="(label, head, i) in header" :key="'filtreCol_' + i" :class="head">
|
||||
<div v-if="checkbox[head] !== undefined" :id="'filtreCol_' + head" :class="classes[head]"
|
||||
class="flex justify-between">
|
||||
<input class="ml-2 check_tout" type="checkbox" @click.stop="validerCheckboxCol(head)" />
|
||||
<button @click.stop="checkboxValider(head, checkbox[head])" class="btn_action">
|
||||
<i class="gt-check"></i> <span class="checkCol">Valider</span>
|
||||
<input class="ml-2" type="checkbox" @click.stop="validerCheckboxCol(head)" />
|
||||
<button @click.stop="checkboxValider(head, checkbox[head])">
|
||||
<i class="gt-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="filtreCol.indexOf(head) !== -1" :id="'filtreCol_' + head">
|
||||
|
@ -129,7 +129,7 @@
|
|||
<div v-if="checkbox[name] !== undefined">
|
||||
<div v-if="td.split('-')[0] === 'dataid'" class="text-center">
|
||||
<label>
|
||||
<input class="check_action" type="checkbox" v-model="Tcheckbox[name]" :value="td.split('-')[1]" />
|
||||
<input type="checkbox" v-model="Tcheckbox[name]" :value="td.split('-')[1]" />
|
||||
</label>
|
||||
</div>
|
||||
<div v-else v-html="td"></div>
|
||||
|
@ -271,6 +271,9 @@ const props = defineProps({
|
|||
},
|
||||
filtreselect: {
|
||||
type: String,
|
||||
},
|
||||
gamutable_version_demandee: {
|
||||
type: Number
|
||||
}
|
||||
});
|
||||
let table = ref([]);
|
||||
|
@ -323,12 +326,11 @@ let filtreColValeurs = [];
|
|||
onMounted(() => {
|
||||
localforage.setDriver(localforage[props.stockage.toUpperCase()]);
|
||||
const gamutable_version_production = $c.getCookie('gamutable_version_production') ?? 1;
|
||||
console.log('gamutable_version_production ', +gamutable_version_production);
|
||||
console.log('gamutable_version_production ', gamutable_version_production);
|
||||
|
||||
if (+document.gamutable_version_demandee > +gamutable_version_production) {
|
||||
if (+props.gamutable_version_demandee > gamutable_version_production) {
|
||||
console.log("⚠ Vidange du localstorage ⚠");
|
||||
console.log('gamutable_version_demandee ', +document.gamutable_version_demandee);
|
||||
$c.setCookie('gamutable_version_production', +document.gamutable_version_demandee )
|
||||
$c.setCookie('gamutable_version_production', +props.gamutable_version_demandee )
|
||||
localStorage.clear(); // suppression des configs (entetes) + suppression des donnes si stockage localstorage
|
||||
localforage.clear(); // suppression de indexeddbb
|
||||
}
|
||||
|
@ -447,9 +449,6 @@ const tableau = computed(() => {
|
|||
});
|
||||
return rsearch;
|
||||
});
|
||||
// if (!ttt.length) {
|
||||
// resetTri();
|
||||
// }
|
||||
return pagination(ttt);
|
||||
});
|
||||
|
||||
|
@ -821,9 +820,6 @@ function chargerJson(id) {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!tableau.value.length){
|
||||
resetTri();
|
||||
}
|
||||
|
||||
if (parseInt(props._id) > 0) {
|
||||
let _id = parseInt(props._id);
|
||||
|
@ -1089,6 +1085,7 @@ function delLigne(id) {
|
|||
if (id < 0) {
|
||||
id = id * -1;
|
||||
}
|
||||
console.log("delLigne : ", id);
|
||||
let i = trouver_index(table.value, id);
|
||||
if (i !== -1) {
|
||||
table.value.splice(i, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue