faire fonctionner le rechargement du gamutable ou de la ligne unique lorsqu'on a _deux gamutables dans la même page.
A DISCUTER: pour l'instant c'est sub-optimal car on recharge les 2 gamutables - on pourrait avoir un parametre pour préciser celui que l'on veut recharger. - ceci dit le fonctionnement actuel est tout à fait satisfaisant dans le cas où la modif impacte les 2...
This commit is contained in:
parent
a24b165ea0
commit
aebe8b1863
3 changed files with 15 additions and 3 deletions
|
@ -50,7 +50,7 @@
|
||||||
nomblocajaxreload="#ENV{nomblocajaxreload}"
|
nomblocajaxreload="#ENV{nomblocajaxreload}"
|
||||||
stockage="#ENV{stockage,localstorage}"
|
stockage="#ENV{stockage,localstorage}"
|
||||||
includespip="#ENV{includespip}"
|
includespip="#ENV{includespip}"
|
||||||
ref="montableau"
|
ref="montableau_deux"
|
||||||
filtrer="#ENV{filtrer}"
|
filtrer="#ENV{filtrer}"
|
||||||
affichage_id="#ENV{_id}"
|
affichage_id="#ENV{_id}"
|
||||||
_id="#ENV{_id}"
|
_id="#ENV{_id}"
|
||||||
|
|
|
@ -22,11 +22,13 @@ jQuery(function () {
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
if (parseInt(id) > 0) {
|
if (parseInt(id) > 0) {
|
||||||
app.rechargerJson(id);
|
app.rechargerJson(id);
|
||||||
|
app.rechargerJson_deux(id);
|
||||||
} else {
|
} else {
|
||||||
app.rechargerJson();
|
app.rechargerJson();
|
||||||
|
app.rechargerJson_deux();
|
||||||
}
|
}
|
||||||
if (nomBlocAjaxReload !== undefined) {
|
if (nomBlocAjaxReload !== undefined) {
|
||||||
console.log('depart reload: ' + nomBlocAjaxReload);
|
console.log('depart reload: ' + nomBlocAjaxReload);
|
||||||
ajaxReload(nomBlocAjaxReload, {
|
ajaxReload(nomBlocAjaxReload, {
|
||||||
args: { id },
|
args: { id },
|
||||||
callback: function () {},
|
callback: function () {},
|
||||||
|
@ -36,7 +38,7 @@ console.log('depart reload: ' + nomBlocAjaxReload);
|
||||||
});
|
});
|
||||||
|
|
||||||
// lancement d'une modalbox
|
// lancement d'une modalbox
|
||||||
$('#app').on('click', '.modalbox', function (e) {
|
$('#app').on('click', '.modalbox', function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let confirmation = $(this).data('confirm');
|
let confirmation = $(this).data('confirm');
|
||||||
|
@ -396,6 +398,7 @@ let monTableau = {
|
||||||
let url = this.apiuri;
|
let url = this.apiuri;
|
||||||
if (parseInt(id) > 0) {
|
if (parseInt(id) > 0) {
|
||||||
url += '&id=' + id;
|
url += '&id=' + id;
|
||||||
|
console.log('url:' + url);
|
||||||
} else {
|
} else {
|
||||||
let config = localStorage.getItem('header_' + this.nameLocalStorage);
|
let config = localStorage.getItem('header_' + this.nameLocalStorage);
|
||||||
config = recupJson(config);
|
config = recupJson(config);
|
||||||
|
@ -764,6 +767,9 @@ const gamuTable = {
|
||||||
rechargerJson(id) {
|
rechargerJson(id) {
|
||||||
this.$refs.montableau.chargerJson(id);
|
this.$refs.montableau.chargerJson(id);
|
||||||
},
|
},
|
||||||
|
rechargerJson_deux(id) {
|
||||||
|
this.$refs.montableau_deux.chargerJson(id);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,10 @@ jQuery(function () {
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
if (parseInt(id) > 0) {
|
if (parseInt(id) > 0) {
|
||||||
app.rechargerJson(id);
|
app.rechargerJson(id);
|
||||||
|
app.rechargerJson_deux(id);
|
||||||
} else {
|
} else {
|
||||||
app.rechargerJson();
|
app.rechargerJson();
|
||||||
|
app.rechargerJson_deux();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nomBlocAjaxReload !== undefined) {
|
if (nomBlocAjaxReload !== undefined) {
|
||||||
|
@ -452,6 +454,7 @@ var monTableau = {
|
||||||
|
|
||||||
if (parseInt(id) > 0) {
|
if (parseInt(id) > 0) {
|
||||||
url += '&id=' + id;
|
url += '&id=' + id;
|
||||||
|
console.log('url:' + url);
|
||||||
} else {
|
} else {
|
||||||
var config = localStorage.getItem('header_' + this.nameLocalStorage);
|
var config = localStorage.getItem('header_' + this.nameLocalStorage);
|
||||||
config = recupJson(config);
|
config = recupJson(config);
|
||||||
|
@ -726,6 +729,9 @@ var gamuTable = {
|
||||||
methods: {
|
methods: {
|
||||||
rechargerJson: function rechargerJson(id) {
|
rechargerJson: function rechargerJson(id) {
|
||||||
this.$refs.montableau.chargerJson(id);
|
this.$refs.montableau.chargerJson(id);
|
||||||
|
},
|
||||||
|
rechargerJson_deux: function rechargerJson_deux(id) {
|
||||||
|
this.$refs.montableau_deux.chargerJson(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue