api_lock inside kfet.js

This commit is contained in:
Ludovic Stephan 2017-04-03 16:08:40 -03:00
parent 4af2562121
commit 5020037103
2 changed files with 3 additions and 9 deletions

View file

@ -268,9 +268,9 @@ var authDialog = new UserDialog({
});
function api_with_auth(settings, password) {
if (window.lock == 1)
if (window.api_lock == 1)
return false;
window.lock = 1;
window.api_lock = 1;
var url = settings.url;
if (!url)
@ -311,6 +311,6 @@ function api_with_auth(settings, password) {
}
})
.always(function() {
window.lock = 0;
window.api_lock = 0;
});
}

View file

@ -176,12 +176,6 @@
$(document).ready(function() {
'use strict';
// -----
// General
// -----
// Lock to avoid multiple requests
window.lock = 0;
// -----
// Auth