diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/codeq.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/codeq.js b/js/codeq.js index 0ff78b2..702ccfa 100644 --- a/js/codeq.js +++ b/js/codeq.js @@ -736,4 +736,14 @@ window.phandler = null; // TODO: this is for debug only return n; }; + var jqDisabled = $('#disabled'), + waitCssEnter = {'cursor': 'wait', 'display': ''}; + + codeq.wait = function (promise) { + jqDisabled.css(waitCssEnter); + return promise.fin(function () { + jqDisabled.css('display', 'none'); + }); + }; + })(); |