fix(edit) showMessage: empty message

This commit is contained in:
coderaiser 2014-06-10 15:04:23 -04:00
parent 30a19d23ea
commit 29147257fb

View file

@ -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);
};