mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
refactor(edit) showMessage
This commit is contained in:
parent
da202afdd9
commit
2cf8db4018
1 changed files with 9 additions and 4 deletions
|
|
@ -465,7 +465,9 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
var parent,
|
||||
HIDE_TIME = 2000;
|
||||
|
||||
if (!Msg) {
|
||||
if (Msg) {
|
||||
Msg.innerHTML = text;
|
||||
} else {
|
||||
DOM.load.style({
|
||||
id : 'msg-css',
|
||||
inner : '#js-view .msg {' +
|
||||
|
|
@ -485,13 +487,16 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip, MenuI
|
|||
Msg = DOM.load({
|
||||
name : 'div',
|
||||
className : 'msg',
|
||||
parent : parent
|
||||
parent : parent,
|
||||
inner : text
|
||||
});
|
||||
}
|
||||
|
||||
Msg.innerHTML = text;
|
||||
DOM.show(Msg);
|
||||
setTimeout(Util.exec.ret(DOM.hide, Msg), HIDE_TIME);
|
||||
|
||||
setTimeout(function() {
|
||||
DOM.hide(Msg);
|
||||
}, HIDE_TIME);
|
||||
};
|
||||
|
||||
init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue