Pman.Lock.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 18 Nov 2010 09:30:52 +0000 (17:30 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 18 Nov 2010 09:30:52 +0000 (17:30 +0800)
Pman.Lock.js

index e51c211..7229987 100644 (file)
  * 
  */
 Pman.Lock = function (cfg) {
-        this.cfg = cfg;
-        var _t = this;
-        Pman.Request({
-            url : baseURL + 'Core/Lock/lock',
-            params : {
-                on_table : cfg.table,
-                on_id : cfg.id
-            },
-            failure : function() {
-                Roo.MessageBox.alert("Error", "Lock Request failed, please try again");
-            },
-            success : function(data)
-            {
-                Roo.log(data);
-                
-                if (typeof(data) == 'object') {
-                    this.confirmBreak();
-                    
-                    
-                    
-                }
-                
-                _t.cfg.success.call(_t,_t);
-                
-                
-            }
-        })
-    
-    
-    },
-    
+    this.cfg = cfg;
+    this.attemptLock();
+}
+
+Roo.apply(Pman.Lock.prototype, {
     
-    attempt : function()
+    attemptLock : function()
     {
         var _t = this
         Pman.Request({
@@ -92,7 +66,17 @@ Pman.Lock = function (cfg) {
             }
         })
     },
-    confirmBreak : function 
+    confirmBreak : function (ar)
+    {
+        
+        var msg = '';
+        Roo.each(ar, function(p) {
+            
+           }
+        
+        
+        
+    }
     
     
     unlock : function() {
@@ -121,5 +105,5 @@ Pman.Lock = function (cfg) {
     }
     
 
-}
+});
  
\ No newline at end of file