From: Alan Knowles Date: Wed, 23 Jun 2010 06:27:46 +0000 (+0800) Subject: Roo/Login.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=4b6898431abd246d0676d3f25a47da626ccd0d37;p=roojs1 Roo/Login.js --- diff --git a/Roo/Login.js b/Roo/Login.js index c6824cdc48..465290947f 100644 --- a/Roo/Login.js +++ b/Roo/Login.js @@ -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... {