X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/cf166fd1eaaeddfa266aa46b6442ad2315095c2c..97e1a72c211205e4596accbfc86cf5eeaec487ee:/project/static/js/views/button_toolbar.js diff --git a/project/static/js/views/button_toolbar.js b/project/static/js/views/button_toolbar.js index 7e4b6eab..7f039985 100644 --- a/project/static/js/views/button_toolbar.js +++ b/project/static/js/views/button_toolbar.js @@ -47,6 +47,7 @@ var ButtonToolbarView = View.extend({ buttonPressed: function(event) { + var self = this; var target = event.target; var groupIndex = parseInt($(target).attr('ui:groupindex'), 10); @@ -57,9 +58,13 @@ var ButtonToolbarView = View.extend({ console.log('Executing', scriptletId, 'with params', params); try { - scriptletCenter.scriptlets[scriptletId](this.parent, params); + self.parent.freeze('Wykonuję akcję...'); + setTimeout(function() { + scriptletCenter.scriptlets[scriptletId](self.parent, params); + self.parent.unfreeze(); + }, 10); } catch(e) { - console.log("Scriptlet", scriptletId, "failed."); + console.log("Scriptlet", scriptletId, "failed.", e); } },