From 034a6614444999b57a861dbe682b5ae269a4b924 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Fri, 14 Apr 2017 12:12:43 -0300 Subject: [PATCH] Tweaks on kfet.js --- kfet/static/kfet/js/kfet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kfet/static/kfet/js/kfet.js b/kfet/static/kfet/js/kfet.js index a2b245cf..a7e893b6 100644 --- a/kfet/static/kfet/js/kfet.js +++ b/kfet/static/kfet/js/kfet.js @@ -370,6 +370,8 @@ var authDialog = new UserDialog({ 'content': '
', }); + +//Note/TODO: the returned ajax object can be improved by allowing chaining on errors 403/400 function api_with_auth(settings, password) { if (window.api_lock == 1) 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) return irreg_plural ? irreg_plural : this+'s' ; return this ;