From 09c5637ec03a45d8f329c009083ca44f8eb3648c Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 18 Nov 2010 17:29:36 +0800 Subject: [PATCH] Pman.Lock.js --- Pman.Lock.js | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/Pman.Lock.js b/Pman.Lock.js index 84c42ffa..e51c2117 100644 --- a/Pman.Lock.js +++ b/Pman.Lock.js @@ -83,10 +83,7 @@ Pman.Lock = function (cfg) { Roo.log(data); if (typeof(data) == 'object') { - this.confirmBreak(); - - - + _t.confirmBreak(data); } _t.cfg.success(_t); //dont care about scope.. @@ -94,11 +91,33 @@ Pman.Lock = function (cfg) { } }) - } + }, + confirmBreak : function unlock : function() { - + Pman.Request({ + url : baseURL + 'Core/Lock/unlock', + params : { + id : this.lock_id, + 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') { + _t.confirmBreak(data); + } + + _t.cfg.success(_t); //dont care about scope.. + + + } + }) } -- 2.39.2