[Lada-commits] [PATCH 2 of 2] Cosmetics

Wald Commits scm-commit at wald.intevation.org
Thu Mar 19 14:29:18 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426771806 -3600
# Branch openid
# Node ID 8756f7e423fbe1afd957898f9d9048adc1c52f47
# Parent  3e91716f58627f2cdd490e97404c864434349827
Cosmetics.

diff -r 3e91716f5862 -r 8756f7e423fb app.js
--- 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);
 


More information about the Lada-commits mailing list