From 8ee9e91213d57a9f8bdaa7f843c967d5834760fc Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 18 Nov 2010 17:28:45 +0800 Subject: [PATCH] Pman.Lock.js --- Pman.Lock.js | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/Pman.Lock.js b/Pman.Lock.js index cb8eb283..84c42ffa 100644 --- a/Pman.Lock.js +++ b/Pman.Lock.js @@ -37,7 +37,7 @@ Pman.Lock = function (cfg) { this.cfg = cfg; var _t = this; Pman.Request({ - url : baseURL + 'Core/Lock.php', + url : baseURL + 'Core/Lock/lock', params : { on_table : cfg.table, on_id : cfg.id @@ -49,6 +49,13 @@ Pman.Lock = function (cfg) { { Roo.log(data); + if (typeof(data) == 'object') { + this.confirmBreak(); + + + + } + _t.cfg.success.call(_t,_t); @@ -57,6 +64,39 @@ Pman.Lock = function (cfg) { }, + + + attempt : function() + { + 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(_t); //dont care about scope.. + + + } + }) + } + + unlock : function() { } -- 2.39.2