Fix asynchronous calls with resetSettings
The `resetSettings` function now returns the ajax object, allowing to chain other calls to it, e.g. the `getHistory` function.
This commit is contained in:
parent
5d8427e601
commit
bf0e345301
1 changed files with 5 additions and 4 deletions
|
@ -182,7 +182,7 @@ $(document).ready(function() {
|
|||
settings = {}
|
||||
|
||||
function resetSettings() {
|
||||
$.ajax({
|
||||
return $.ajax({
|
||||
dataType: "json",
|
||||
url : "{% url 'kfet.kpsul.get_settings' %}",
|
||||
method : "POST",
|
||||
|
@ -1431,9 +1431,10 @@ $(document).ready(function() {
|
|||
resetArticles();
|
||||
resetPreviousOp();
|
||||
khistory.reset();
|
||||
resetSettings();
|
||||
getArticles();
|
||||
getHistory();
|
||||
resetSettings().done(function (){
|
||||
getArticles();
|
||||
getHistory();
|
||||
});
|
||||
}
|
||||
|
||||
function resetSelectable() {
|
||||
|
|
Loading…
Add table
Reference in a new issue