fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3cff6e4
)
Removed overlay when calling interactive scripts (purely cosmetic).
author
Łukasz Rekucki
<lrekucki@gmail.com>
Tue, 25 May 2010 11:36:42 +0000
(13:36 +0200)
committer
Łukasz Rekucki
<lrekucki@gmail.com>
Tue, 25 May 2010 11:36:42 +0000
(13:36 +0200)
redakcja/static/js/button_scripts.js
patch
|
blob
|
history
diff --git
a/redakcja/static/js/button_scripts.js
b/redakcja/static/js/button_scripts.js
index
0d38b00
..
e7b1c42
100644
(file)
--- 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 text = this.XMLEditorSelectedText(context);
if(!text) return done();
- var original = text;
+ var original = text;
$
nblck_each(exprs, function(expr, index) {
$progress.html(600 + index);
nblck_each(exprs, function(expr, index) {
$progress.html(600 + index);
@@
-258,15
+258,20
@@
function ScriptletCenter()
ScriptletCenter.prototype.callInteractive = function(opts) {
$progress = $('<span>Executing script</span>');
var self = this;
ScriptletCenter.prototype.callInteractive = function(opts) {
$progress = $('<span>Executing script</span>');
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(){
self.scriptlets[opts.action](opts.context, opts.extra, function(){
- $.unblockUI(); // done
+ /*if(timer)
+ clearTimeout(timer);
+ else */
+ $.unblockUI(); // done
});
}
});
}
@@
-277,8
+282,8
@@
ScriptletCenter.prototype.XMLEditorSelectedText = function(editor) {
ScriptletCenter.prototype.XMLEditorReplaceSelectedText = function(editor, replacement)
{
ScriptletCenter.prototype.XMLEditorReplaceSelectedText = function(editor, replacement)
{
- $progress.html("Replacing text");
- editor.replaceSelection(replacement);
+ $progress.html("Replacing text");
+
editor.replaceSelection(replacement);
};
ScriptletCenter.prototype.XMLEditorMoveCursorForward = function(panel, n) {
};
ScriptletCenter.prototype.XMLEditorMoveCursorForward = function(panel, n) {