sync
[web.mtrack] / MTrackWeb / templates / images / js / mtrack2.js
index 562cb85..8bc2bbb 100644 (file)
@@ -17,7 +17,7 @@ MTrack = {
         Roo.onReady(function () {
             //MTrack.footerSetAndWait();
             if (authUser) {
-                setTimeout(MTrack.keepLoggedIn, 30000);
+                window.setTimeout(MTrack.keepLoggedIn, 30000);
                 
             }
             
@@ -272,6 +272,26 @@ MTrack = {
         MTrack.last_wh = Roo.lib.Dom.getViewHeight();
     },
     
+    
+    keepLoggedIn: function()
+    {
+        Roo.Ajax.request({
+            url : baseURL + '/Login.html',
+            method:  'POST',
+            data : { refresh : 1 },
+            success : function() {
+                
+                window.setTimeout(MTrack.keepLoggedIn, 30000);
+                // what if it's false..currentURL = false;
+                
+                
+            }
+            
+        })
+        
+        
+        
+    },
       /*
       
        $(window)
@@ -282,10 +302,11 @@ MTrack = {
         
     footerSetAndWait : function () {
         return;
-        this.footerPosition();
+        /*this.footerPosition();
         window.setTimeout(function () {
           MTrack.footerSetAndWait();
         }, 1500);
+        */
     }
     
     
@@ -301,7 +322,7 @@ Roo.onReady(function() {
         // ajax change project, and refresh body..
         Roo.Ajax.request({
             method: 'GET',
-            url : baseURL + '/Project.html',
+            url : baseURL + '/Project',
             params : { active_project_id : this.value },
             success : function() {
                 // what if it's false..currentURL = false;