Merge branch 'localforage' of https://git.gamuza.fr/spip/gamutable into localforage

This commit is contained in:
Christophe 2022-03-17 10:52:11 +01:00
commit 525694c1ee
12 changed files with 1488 additions and 1598 deletions

View file

@ -27,6 +27,7 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
url_sort_asc="#CHEMIN{...}" url_sort_asc="#CHEMIN{...}"
url_sort_desc="#CHEMIN{...}" url_sort_desc="#CHEMIN{...}"
stockage="indexeddb" // par defaut : localstorage 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" nomBlocAjaxReload="nom bloc a recharger à la fin du chargement des donnees"
env env
}> }>

View file

@ -7,6 +7,10 @@
margin-left: 2rem; margin-left: 2rem;
} }
.gamutable--surTable .includespip {
margin-left: 2rem;
}
.gamutable--sousTable { .gamutable--sousTable {
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
@ -25,8 +29,8 @@
} }
.gamutable--pagination .page-link { .gamutable--pagination .page-link {
margin: 0 .2rem; margin: 0 0.2rem;
background-color: #EEE; background-color: #eee;
cursor: pointer; cursor: pointer;
} }

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,9 @@
.gamutable-nbrMax { .gamutable-nbrMax {
margin-left: 2rem; margin-left: 2rem;
} }
.includespip {
margin-left: 2rem;
}
} }
.gamutable--sousTable { .gamutable--sousTable {
display: flex; display: flex;
@ -17,8 +20,8 @@
display: flex; display: flex;
} }
.page-link { .page-link {
margin: 0 .2rem; margin: 0 0.2rem;
background-color: #EEE; background-color: #eee;
cursor: pointer; cursor: pointer;
} }
} }

View file

@ -19,11 +19,15 @@ function gamutable_fermer_modalbox($id_objet = 9999999999){
id = "$id_objet"; id = "$id_objet";
id = parseInt(id); id = parseInt(id);
if (id > 0 && id < 9999999999) { if (id > 0 && id < 9999999999) {
if (typeof app !== 'undefined') {
app.rechargerJson(id); app.rechargerJson(id);
}
$.modalboxclose(); $.modalboxclose();
} }
if (id === 9999999999) { if (id === 9999999999) {
app.rechargerJson(); if (typeof app !== 'undefined') {
app.rechargerJson(id);
}
$.modalboxclose(); $.modalboxclose();
} }
delete id; delete id;

View file

@ -31,7 +31,7 @@ function gamutable_affichage_final($flux) {
if ($p) { if ($p) {
$url_relecture = parametre_url(self(), 'var_mode', 'gamutable', '&'); $url_relecture = parametre_url(self(), 'var_mode', 'gamutable', '&');
$label = "Mode gamuTable"; $label = "Mode gamuTable";
$js .= "jQuery('#minibando_bouton_debug ul').append('<li><a class=\"spip-admin-boutons \" href=\"$url_relecture\">$label</a></li>');"; $js = "jQuery('#minibando_bouton_debug ul').append('<li><a class=\"spip-admin-boutons \" href=\"$url_relecture\">$label</a></li>');";
$js = "jQuery(function(){ $js });"; $js = "jQuery(function(){ $js });";
$js = "<script>$js</script>"; $js = "<script>$js</script>";
$flux = substr_replace($flux, $js, $p, 0); $flux = substr_replace($flux, $js, $p, 0);

View file

@ -3,6 +3,7 @@
[(#SET{sort_asc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_asc]})] [(#SET{sort_asc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_asc]})]
[(#SET{sort_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})] [(#SET{sort_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})]
<span class="crayon gamutable-yyyy-nn"></span> <span class="crayon gamutable-yyyy-nn"></span>
<div id="app"> <div id="app">
<div class="container_un"> <div class="container_un">
<div class="gamutableUn"> <div class="gamutableUn">
@ -19,6 +20,7 @@
filtrecolmulti="#ENV{filtrecolmulti,oui}" filtrecolmulti="#ENV{filtrecolmulti,oui}"
nomblocajaxreload="#ENV{nomblocajaxreload}" nomblocajaxreload="#ENV{nomblocajaxreload}"
stockage="#ENV{stockage,localstorage}" stockage="#ENV{stockage,localstorage}"
includespip="#ENV{includespip}"
ref="montableau" ref="montableau"
></mon-tableau> ></mon-tableau>
</div> </div>
@ -40,6 +42,7 @@
filtrecolmulti="[(#ENV{filtrecolmulti_deux, #ENV{filtrecolmulti,oui}})]" filtrecolmulti="[(#ENV{filtrecolmulti_deux, #ENV{filtrecolmulti,oui}})]"
nomBlocAjaxReload="#ENV{nomblocajaxreload}" nomBlocAjaxReload="#ENV{nomblocajaxreload}"
stockage="#ENV{stockage,localstorage}" stockage="#ENV{stockage,localstorage}"
includespip="#ENV{includespip}"
ref="montableau" ref="montableau"
></mon-tableau> ></mon-tableau>
</div> </div>

View file

@ -195,6 +195,9 @@ let monTableau = {
stockage: { stockage: {
type: String, type: String,
}, },
includespip: {
type: String,
},
}, },
data: function () { data: function () {
return { return {
@ -588,7 +591,8 @@ let monTableau = {
<button class="btn gamutable--resetOrderBy" type="button" @click.stop="resetTri()" <button class="btn gamutable--resetOrderBy" type="button" @click.stop="resetTri()"
title="Réinitialiser les tris des colonnes"> title="Réinitialiser les tris des colonnes">
<i class="fa fa-repeat fas fa-redo"></i> <i class="fa fas fa-eraser rouge"></i>
<i class="fa fa-filter fas"></i>
</button> </button>
<button class="btn gamutable--vueTable" title="Switcher en Vue tableau" <button class="btn gamutable--vueTable" title="Switcher en Vue tableau"
@ -622,6 +626,7 @@ let monTableau = {
<i class="fa fas fa-database"></i> <i class="fa fas fa-database"></i>
</span> </span>
<span class="gamutable-nbrMax" :data-nbrmax="table.length">{{tableau.length}} / {{table.length}} éléments</span> <span class="gamutable-nbrMax" :data-nbrmax="table.length">{{tableau.length}} / {{table.length}} éléments</span>
<spam class="includespip" v-html="this.includespip"> </span>
</div> </div>
<div class="vueBlocs" v-if="quelleVue === 'bloc'"> <div class="vueBlocs" v-if="quelleVue === 'bloc'">
@ -645,7 +650,7 @@ let monTableau = {
</tr> </tr>
<tr v-if="filtreCol.length" class="filtreColonne"> <tr v-if="filtreCol.length" class="filtreColonne">
<th v-for="(label,head,i) in header" :key="'filtreCol_'+i"> <th v-for="(label,head,i) in header" :key="'filtreCol_'+i">
<div v-if="filtreCol.indexOf(head) !== -1" :id="'filtreCol_'+head"> <div v-if="filtreCol.indexOf(head) !== -1" :id="'filtreCol_'+head" :class="classes[head]">
<vue-select <vue-select
v-if="filtreColType[head] === 'select'" v-if="filtreColType[head] === 'select'"
v-model="filtreColSelected[head]" v-model="filtreColSelected[head]"

File diff suppressed because one or more lines are too long

2853
js/vue.js

File diff suppressed because it is too large Load diff

2
js/vue.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,9 +1,9 @@
<paquet <paquet
prefix="gamutable" prefix="gamutable"
categorie="outil" categorie="outil"
version="3.2.0" version="3.2.1"
etat="dev" etat="dev"
compatibilite="[3.2.0-dev;4.0.*]" compatibilite="[3.2.0-dev;4.1.*]"
logo="prive/themes/spip/images/gamutable-xx.svg" logo="prive/themes/spip/images/gamutable-xx.svg"
documentation="" documentation=""
> >