X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..4aed3dc31c344059763a6522fdd950ec0121bfc2:/redakcja/static/js/button_scripts.js?ds=inline diff --git a/redakcja/static/js/button_scripts.js b/redakcja/static/js/button_scripts.js index 0d38b004..2a585dc5 100644 --- a/redakcja/static/js/button_scripts.js +++ b/redakcja/static/js/button_scripts.js @@ -162,7 +162,7 @@ function ScriptletCenter() var text = this.XMLEditorSelectedText(context); if(!text) return done(); - var original = text; + var original = text;$ nblck_each(exprs, function(expr, index) { $progress.html(600 + index); @@ -259,14 +259,19 @@ ScriptletCenter.prototype.callInteractive = function(opts) { $progress = $('Executing script'); var self = this; - $.blockUI({ - message: $progress, - - }); + /* This won't work, 'cause the JS below might be synchronous :( */ + /* var timer = setTimeout(function() { + $.blockUI({message: $progress}); + timer = null; + }, 1000); */ + $.blockUI({message: $progress, showOverlay: false}); self.scriptlets[opts.action](opts.context, opts.extra, function(){ - $.unblockUI(); // done + /*if(timer) + clearTimeout(timer); + else */ + $.unblockUI(); // done }); } @@ -278,7 +283,7 @@ ScriptletCenter.prototype.XMLEditorSelectedText = function(editor) { ScriptletCenter.prototype.XMLEditorReplaceSelectedText = function(editor, replacement) { $progress.html("Replacing text"); - editor.replaceSelection(replacement); + editor.replaceSelection(replacement); }; ScriptletCenter.prototype.XMLEditorMoveCursorForward = function(panel, n) {