summaryrefslogtreecommitdiff
path: root/www/js/auth.js
diff options
context:
space:
mode:
authorPeterTheOne <petertheone@gmail.com>2016-01-28 20:29:46 (GMT)
committerPeterTheOne <petertheone@gmail.com>2016-01-28 20:29:46 (GMT)
commita3d085734454a66955bcc2c642b0a4f7bf5d2b92 (patch)
treed290b36b2eb96d6350ec31e02e2a9e2f0c93b14c /www/js/auth.js
parent7aa6781c617b91e3ed28d528428087f11131daac (diff)
fix musicgrid bugs, create Rivendell.Group class, refactor
Diffstat (limited to 'www/js/auth.js')
-rw-r--r--www/js/auth.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/www/js/auth.js b/www/js/auth.js
index 2624b98..f830a0a 100644
--- a/www/js/auth.js
+++ b/www/js/auth.js
@@ -20,9 +20,13 @@
* along with rhwebimport. If not, see <http://www.gnu.org/licenses/>.
*/
-var auth_username;
-var auth_fullname;
-var auth_token;
+'use strict';
+
+var Rivendell = Rivendell || {};
+
+var auth_username = null;
+var auth_fullname = null;
+var auth_token = null;
function auth_loginSuccess(data) {
if (data.status == 'OK') {
@@ -46,7 +50,7 @@ function auth_loginSuccess(data) {
}
function auth_loginError(req, status, error) {
- message = req.status + ': ' + error;
+ var message = req.status + ': ' + error;
if(req.status == 401) {
message = "Benutzer und/oder Passwort sind falsch!";
}
@@ -93,13 +97,13 @@ function auth_init() {
function auth_cleanup() {
sessionStorage.removeItem("auth_username");
- delete auth_username;
+ auth_username = null;
$("#username").val('').focus();
sessionStorage.removeItem("auth_fullname");
- delete auth_fullname;
+ auth_fullname = null;
sessionStorage.removeItem("auth_token");
- delete auth_token;
+ auth_token = null;
$("#password").val('');
}