Roo/Login.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 23 Jun 2010 06:27:46 +0000 (14:27 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 23 Jun 2010 06:27:46 +0000 (14:27 +0800)
Roo/Login.js

index c6824cd..4652909 100644 (file)
@@ -124,11 +124,29 @@ Roo.extend(Roo.Login, Roo.LayoutDialog, {
             method: this.method,
             success:  cfg.success || this.success,
             failure : cfg.failure || this.failure,
-            scope : this
+            scope : this,
+            callCfg : cfg
               
         });  
     }, 
     
+    failure : function (response, opts) // called if login 'check' fails.. (causes re-check)
+    {
+        this.authUser = -1;
+        this.sending = false;
+        var res = Pman.processResponse(response);
+        //console.log(res);
+        if ( Pman.Login.checkFails > 2) {
+            Pman.Preview.disable();
+            Roo.MessageBox.alert("Error", res.errorMsg ? res.errorMsg : 
+                "Error getting authentication status. - try reloading"); 
+            return;
+        }
+        
+        this.check.defer(1000, this, [ opts.callCfg ]);
+        return;  
+    },
+    
     
     
     items : [
@@ -158,23 +176,6 @@ Pman.Login =  new Roo.util.Observable({
     sending : false,
     
     
-    failure : function (response, opts) // called if login 'check' fails.. (causes re-check)
-    {
-        this.authUser = -1;
-        this.sending = false;
-        var res = Pman.processResponse(response);
-        //console.log(res);
-        if ( Pman.Login.checkFails > 2) {
-            Pman.Preview.disable();
-            Roo.MessageBox.alert("Error", res.errorMsg ? res.errorMsg : 
-                "Error getting authentication status. - try reloading"); 
-            return;
-        }
-            
-        Pman.Login.check.defer(1000, Pman.Login, [ true ]);
-        return;  
-    },
-    
     
     success : function(response, opts)  // check successfull...
     {