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 = {}
|
||||
|
||||
function resetSettings() {
|
||||
$.ajax({
|
||||
return $.ajax({
|
||||
dataType: "json",
|
||||
url : "{% url 'kfet.kpsul.get_settings' %}",
|
||||
method : "POST",
|
||||
|
@ -191,7 +191,6 @@ $(document).ready(function() {
|
|||
settings['addcost_for'] = data['addcost_for'];
|
||||
settings['addcost_amount'] = parseFloat(data['addcost_amount']);
|
||||
settings['subvention_cof'] = parseFloat(data['subvention_cof']);
|
||||
displayAddcost();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1431,9 +1430,11 @@ $(document).ready(function() {
|
|||
resetArticles();
|
||||
resetPreviousOp();
|
||||
khistory.reset();
|
||||
resetSettings();
|
||||
resetSettings().done(function (){
|
||||
getArticles();
|
||||
getHistory();
|
||||
displayAddcost();
|
||||
});
|
||||
}
|
||||
|
||||
function resetSelectable() {
|
||||
|
|
Loading…
Reference in a new issue