mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-04 05:33:10 +00:00
fix(edit) showMessage: mv style to load
This commit is contained in:
parent
f333cd8061
commit
0f038a38d7
1 changed files with 20 additions and 21 deletions
|
|
@ -429,6 +429,21 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
Util.timeEnd(Name + ' load');
|
||||
Util.exec(callback);
|
||||
});
|
||||
|
||||
DOM.load.style({
|
||||
id : 'msg-css',
|
||||
inner : '#js-view .msg {' +
|
||||
'z-index' + ': 1;' +
|
||||
'background-color' + ': #7285B7;' +
|
||||
'color' + ': #D1F1A9;' +
|
||||
'position' + ': fixed;' +
|
||||
'left' + ': 40%;' +
|
||||
'top' + ': 25px;' +
|
||||
'padding' + ': 5px;' +
|
||||
'opacity' + ': 0.9;' +
|
||||
'transition' + ': ease 0.5s;' +
|
||||
'}'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -470,24 +485,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
}
|
||||
|
||||
this.showMessage = function(text) {
|
||||
var HIDE_TIME = 2000;
|
||||
|
||||
if (!Msg) {
|
||||
DOM.load.style({
|
||||
id : 'msg-css',
|
||||
inner : '#js-view .msg {' +
|
||||
'z-index' + ': 1;' +
|
||||
'background-color' + ': #7285B7;' +
|
||||
'color' + ': #D1F1A9;' +
|
||||
'position' + ': fixed;' +
|
||||
'left' + ': 40%;' +
|
||||
'top' + ': 25px;' +
|
||||
'padding' + ': 5px;' +
|
||||
'opacity' + ': 0.9;' +
|
||||
'transition' + ': ease 0.5s;' +
|
||||
'}'
|
||||
});
|
||||
}
|
||||
var msg, HIDE_TIME = 2000;
|
||||
|
||||
/*
|
||||
* Msg should be created and removed
|
||||
|
|
@ -496,15 +494,16 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
* is called - bug occures: empty box
|
||||
* with no text inside.
|
||||
*/
|
||||
Msg = DOM.load({
|
||||
msg = DOM.load({
|
||||
name : 'div',
|
||||
className : 'msg',
|
||||
parent : Element,
|
||||
inner : text
|
||||
inner : text,
|
||||
func : alert
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
DOM.remove(Msg, Element);
|
||||
DOM.remove(msg, Element);
|
||||
}, HIDE_TIME);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue