From: Alan Knowles Date: Thu, 18 Nov 2010 09:26:42 +0000 (+0800) Subject: Pman.Lock.js X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=b767a258c9c2b6f74ad40203061a4942a4b8f148 Pman.Lock.js --- diff --git a/Pman.Lock.js b/Pman.Lock.js index c90f8684..823d687c 100644 --- a/Pman.Lock.js +++ b/Pman.Lock.js @@ -4,27 +4,34 @@ * * usage: * - Pman.Lock.lock( { - table : 'Product', - id : 123, - success : function() { ..show dialog etc..... } - }); - Pman.Lock.unlock( { - table : 'Product', - id : 123 - }); - * + * new Pman.Lock( { table : 'Product', id : 123, success : function(lock) { ..show dialog etc..... - * - * ... dostuff.. - * lock.unlock() - * } + + ... dostuff.. + ... send _lock=XXX to Roo updated code.. + + lock.unlock() -- we dont care about the result.. + } } * * + * + * call : + * try and lock it.. + * baseURL + /Core/Lock/lock?on_id=...&on_table=... + * - returns id or an array of who has the locks. + * + * Force an unlock after a warning.. + * baseURL + /Core/Lock/lock?on_id=...&on_table=...&force=1 + * - returns id.. + * + * Unlock - call when window is closed.. + * baseURL + /Core/Lock/unlock?on_id=...&on_table=...&force=1 + * - returns jerr or jok + * */ Pman.Lock = function (cfg) { this.cfg = cfg;