WIP: Aureplop/kpsul js refactor #501
1 changed files with 3 additions and 1 deletions
|
@ -370,6 +370,8 @@ var authDialog = new UserDialog({
|
||||||
'content': '<div class="capslock"><span class="glyphicon glyphicon-lock"></span><input type="password" name="password" autofocus><div>',
|
'content': '<div class="capslock"><span class="glyphicon glyphicon-lock"></span><input type="password" name="password" autofocus><div>',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Note/TODO: the returned ajax object can be improved by allowing chaining on errors 403/400
|
||||||
function api_with_auth(settings, password) {
|
function api_with_auth(settings, password) {
|
||||||
if (window.api_lock == 1)
|
if (window.api_lock == 1)
|
||||||
return false;
|
return false;
|
||||||
|
@ -418,7 +420,7 @@ function api_with_auth(settings, password) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String.prototype.pluralize = function(count, irreg_plural = false) {
|
String.prototype.pluralize = function(count, irreg_plural) {
|
||||||
if (Math.abs(count) >= 2)
|
if (Math.abs(count) >= 2)
|
||||||
return irreg_plural ? irreg_plural : this+'s' ;
|
return irreg_plural ? irreg_plural : this+'s' ;
|
||||||
return this ;
|
return this ;
|
||||||
|
|
Loading…
Reference in a new issue