DataObjects/Core_notify.php
[Pman.Core] / Pman.Login.js
index e6a2846..dee0413 100644 (file)
@@ -1,9 +1,13 @@
 //<script type="text/javascript">
 
+/**
+ * login code -
+ * fires Pman 'authrefreshed'  event on every poll to server..
+ *
+ */
 
 /***
 re-arrange language code...
-
 * flipping language should be like this:
 * 
 * Ext.apply(_T, _T[lang]);
@@ -17,6 +21,7 @@ Pman.Login =  new Roo.util.Observable({
     events : {
         
         'render' : true
+       
     },
     disabled : false,
     
@@ -57,6 +62,8 @@ Pman.Login =  new Roo.util.Observable({
                     //console.log('call failure');
                     return Pman.Login.failure(response,opts);
                 }
+                
+                
                 if (!res.data.id) { // id=0 == login failure.
                     return this.show(true);
                 }
@@ -66,6 +73,7 @@ Pman.Login =  new Roo.util.Observable({
                 this.fillAuth(res.data);   
                 this.checkFails =0;
                 Pman.onload();
+                return false;
             },
             failure : Pman.Login.show,
             scope : Pman.Login
@@ -146,6 +154,7 @@ Pman.Login =  new Roo.util.Observable({
         
         this.checkFails =0;
         Pman.onload();
+        return false;
     },
     
     fillAuth: function(au) {
@@ -154,6 +163,8 @@ Pman.Login =  new Roo.util.Observable({
         this.authUser = au;
         this.lastChecked = new Date();
         Pman.fireEvent('authrefreshed', au);
+        
+        
         //Pman.Tab.FaxQueue.newMaxId(au.faxMax);
         //Pman.Tab.FaxTab.setTitle(au.faxNumPending);
         
@@ -187,7 +198,7 @@ Pman.Login =  new Roo.util.Observable({
         Pman.Login.intervalID =  window.setInterval(function() {
                   Pman.Login.check(false);
                 }, 120000); // every 120 secs = 2mins..
-        
+        return true;
         
     },