X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Lock.js;h=e51c21173471086486f0f9fe035678b75a4c4782;hb=09c5637ec03a45d8f329c009083ca44f8eb3648c;hp=84c42ffa647554c5821a440366e77fca0585ebe0;hpb=8ee9e91213d57a9f8bdaa7f843c967d5834760fc;p=Pman.Core 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.. + + + } + }) }