Fix bugs introduced by previous commit

This commit is contained in:
Ludovic Stephan 2017-03-18 02:47:30 -03:00
parent 9e905b0f8b
commit 1d532616b7

View file

@ -74,13 +74,14 @@ class History {
if (this.lock == 1)
return false;
this.lock = 1;
var that = this;
if (window.kpsul) {
var on_success = kpsul.env.coolReset;
var on_success = kpsul._env.coolReset;
var focus_next = kpsul.account_manager._$input_trigramme;
} else {
var on_success = () => this._$container.find('.ui-selected')
.removeClass('.ui-selected) ;
.removeClass('.ui-selected') ;
var focus_next = undefined;
}
@ -99,7 +100,7 @@ class History {
})
.done(function(data) {
on_success();
this.lock = 0;
that.lock = 0;
})
.fail(function($xhr) {
var data = $xhr.responseJSON;
@ -113,7 +114,7 @@ class History {
displayErrors(getErrorsHtml(data));
break;
}
this.lock = 0;
that.lock = 0;
});
}