mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
fix(edit) showMessage: empty message
This commit is contained in:
parent
30a19d23ea
commit
29147257fb
1 changed files with 8 additions and 12 deletions
|
|
@ -472,9 +472,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
this.showMessage = function(text) {
|
||||
var HIDE_TIME = 2000;
|
||||
|
||||
if (Msg) {
|
||||
Msg.innerHTML = text;
|
||||
} else {
|
||||
if (!Msg) {
|
||||
DOM.load.style({
|
||||
id : 'msg-css',
|
||||
inner : '#js-view .msg {' +
|
||||
|
|
@ -490,19 +488,17 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
'font-size' + ': 16px' +
|
||||
'}'
|
||||
});
|
||||
|
||||
Msg = DOM.load({
|
||||
name : 'div',
|
||||
className : 'msg',
|
||||
parent : Element,
|
||||
inner : text
|
||||
});
|
||||
}
|
||||
|
||||
DOM.show(Msg);
|
||||
Msg = DOM.load({
|
||||
name : 'div',
|
||||
className : 'msg',
|
||||
parent : Element,
|
||||
inner : text
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
DOM.hide(Msg);
|
||||
DOM.remove(Msg, Element);
|
||||
}, HIDE_TIME);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue