forked from DGNum/gestioCOF
Merge branch 'Aufinal/fix_history' into 'master'
Fix asynchronous calls with resetSettings See merge request !229
This commit is contained in:
commit
95a8b484e0
1 changed files with 6 additions and 5 deletions
|
@ -182,7 +182,7 @@ $(document).ready(function() {
|
||||||
settings = {}
|
settings = {}
|
||||||
|
|
||||||
function resetSettings() {
|
function resetSettings() {
|
||||||
$.ajax({
|
return $.ajax({
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
url : "{% url 'kfet.kpsul.get_settings' %}",
|
url : "{% url 'kfet.kpsul.get_settings' %}",
|
||||||
method : "POST",
|
method : "POST",
|
||||||
|
@ -191,7 +191,6 @@ $(document).ready(function() {
|
||||||
settings['addcost_for'] = data['addcost_for'];
|
settings['addcost_for'] = data['addcost_for'];
|
||||||
settings['addcost_amount'] = parseFloat(data['addcost_amount']);
|
settings['addcost_amount'] = parseFloat(data['addcost_amount']);
|
||||||
settings['subvention_cof'] = parseFloat(data['subvention_cof']);
|
settings['subvention_cof'] = parseFloat(data['subvention_cof']);
|
||||||
displayAddcost();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1431,9 +1430,11 @@ $(document).ready(function() {
|
||||||
resetArticles();
|
resetArticles();
|
||||||
resetPreviousOp();
|
resetPreviousOp();
|
||||||
khistory.reset();
|
khistory.reset();
|
||||||
resetSettings();
|
resetSettings().done(function (){
|
||||||
getArticles();
|
getArticles();
|
||||||
getHistory();
|
getHistory();
|
||||||
|
displayAddcost();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetSelectable() {
|
function resetSelectable() {
|
||||||
|
|
Loading…
Reference in a new issue