Fix this
shenanigans
This commit is contained in:
parent
2bc97a115c
commit
11d94ecba8
1 changed files with 18 additions and 17 deletions
|
@ -85,6 +85,7 @@ OpenKfet.prototype = {
|
||||||
|
|
||||||
toggle_force_close: function (password) {
|
toggle_force_close: function (password) {
|
||||||
$.post({
|
$.post({
|
||||||
|
context: this,
|
||||||
url: this.force_close_url,
|
url: this.force_close_url,
|
||||||
data: { force_close: !this.force_close },
|
data: { force_close: !this.force_close },
|
||||||
beforeSend: function ($xhr) {
|
beforeSend: function ($xhr) {
|
||||||
|
@ -96,7 +97,7 @@ OpenKfet.prototype = {
|
||||||
.fail(function ($xhr) {
|
.fail(function ($xhr) {
|
||||||
switch ($xhr.status) {
|
switch ($xhr.status) {
|
||||||
case 403:
|
case 403:
|
||||||
requestAuth({'errors': {}}, this.toggle_force_close);
|
requestAuth({ 'errors': {} }, this.toggle_force_close.bind(this));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue