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_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"
env
}>

View file

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

File diff suppressed because one or more lines are too long

View file

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

View file

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

View file

@ -31,7 +31,7 @@ function gamutable_affichage_final($flux) {
if ($p) {
$url_relecture = parametre_url(self(), 'var_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 = "<script>$js</script>";
$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_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})]
<span class="crayon gamutable-yyyy-nn"></span>
<div id="app">
<div class="container_un">
<div class="gamutableUn">
@ -19,6 +20,7 @@
filtrecolmulti="#ENV{filtrecolmulti,oui}"
nomblocajaxreload="#ENV{nomblocajaxreload}"
stockage="#ENV{stockage,localstorage}"
includespip="#ENV{includespip}"
ref="montableau"
></mon-tableau>
</div>
@ -40,6 +42,7 @@
filtrecolmulti="[(#ENV{filtrecolmulti_deux, #ENV{filtrecolmulti,oui}})]"
nomBlocAjaxReload="#ENV{nomblocajaxreload}"
stockage="#ENV{stockage,localstorage}"
includespip="#ENV{includespip}"
ref="montableau"
></mon-tableau>
</div>

View file

@ -195,6 +195,9 @@ let monTableau = {
stockage: {
type: String,
},
includespip: {
type: String,
},
},
data: function () {
return {
@ -588,7 +591,8 @@ let monTableau = {
<button class="btn gamutable--resetOrderBy" type="button" @click.stop="resetTri()"
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 class="btn gamutable--vueTable" title="Switcher en Vue tableau"
@ -622,6 +626,7 @@ let monTableau = {
<i class="fa fas fa-database"></i>
</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 class="vueBlocs" v-if="quelleVue === 'bloc'">
@ -645,7 +650,7 @@ let monTableau = {
</tr>
<tr v-if="filtreCol.length" class="filtreColonne">
<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
v-if="filtreColType[head] === 'select'"
v-model="filtreColSelected[head]"

File diff suppressed because one or more lines are too long

3029
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
prefix="gamutable"
categorie="outil"
version="3.2.0"
version="3.2.1"
etat="dev"
compatibilite="[3.2.0-dev;4.0.*]"
compatibilite="[3.2.0-dev;4.1.*]"
logo="prive/themes/spip/images/gamutable-xx.svg"
documentation=""
>