changeset 669:8756f7e423fb openid

Cosmetics.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 19 Mar 2015 14:30:06 +0100
parents 3e91716f5862
children 39dd18124ebd
files app.js
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/app.js	Thu Mar 19 14:29:55 2015 +0100
+++ b/app.js	Thu Mar 19 14:30:06 2015 +0100
@@ -74,33 +74,33 @@
         });
     },
 
-    onLoginFailure : function(response, opts) {
+    onLoginFailure: function(response) {
         try {
             var json = Ext.decode(response.responseText);
             if (json) {
-                if (json.message == "699") {
+                if (json.message === '699') {
                     /* This is the unauthorized message with the authentication
                      * redirect in the data */
                     var authUrl = json.data;
                     location.href = authUrl;
                     return;
                 }
-                if (json.message == "698") {
+                if (json.message === '698') {
                     /* This is general authentication error */
                     Ext.MessageBox.alert('Kommunikation mit dem Login Server fehlgeschlagen',
                             json.data);
                     return;
                 }
             }
-        } catch (e) {
+        }
+        catch (e) {
             // This is likely a 404 or some unknown error. Show general error then.
         }
         Ext.MessageBox.alert('Kommunikation mit dem Lada Server fehlgeschlagen',
                 'Es konnte keine erfolgreiche Verbindung zum lada server aufgebaut werden.');
-
     },
 
-    onLoginSuccess: function(response, opts) {
+    onLoginSuccess: function() {
         /* Strip out the openid query params to look nicers. */
         window.history.pushState(this.name, this.name, window.location.pathname);
 

http://lada.wald.intevation.org