MDL-18014 Atto: Make notifications fade in/out.

This commit is contained in:
Damyon Wiese 2014-08-05 16:38:33 +08:00
parent a10c6ea8fc
commit f1018cd615
5 changed files with 18 additions and 15 deletions

View File

@ -538,11 +538,11 @@ EditorNotify.prototype = {
if (this.messageOverlay === null) {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide();
this.messageOverlay.hide(true);
this._wrapper.append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide();
this.messageOverlay.hide(true);
}, this);
}
@ -577,12 +577,12 @@ EditorNotify.prototype = {
'</div>');
this.messageOverlay.empty();
this.messageOverlay.append(bodyContent);
this.messageOverlay.show();
this.messageOverlay.show(true);
this.hideTimer = Y.later(intTimeout, this, function() {
Y.log('Hide Atto notification.', 'debug', LOGNAME_NOTIFY);
this.hideTimer = null;
this.messageOverlay.hide();
this.messageOverlay.hide(true);
});
return this;
@ -2067,6 +2067,7 @@ Y.Base.mix(Y.M.editor_atto.Editor, [EditorFilepicker]);
}, '@VERSION@', {
"requires": [
"node",
"transition",
"io",
"overlay",
"escape",

File diff suppressed because one or more lines are too long

View File

@ -535,11 +535,11 @@ EditorNotify.prototype = {
if (this.messageOverlay === null) {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide();
this.messageOverlay.hide(true);
this._wrapper.append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide();
this.messageOverlay.hide(true);
}, this);
}
@ -573,11 +573,11 @@ EditorNotify.prototype = {
'</div>');
this.messageOverlay.empty();
this.messageOverlay.append(bodyContent);
this.messageOverlay.show();
this.messageOverlay.show(true);
this.hideTimer = Y.later(intTimeout, this, function() {
this.hideTimer = null;
this.messageOverlay.hide();
this.messageOverlay.hide(true);
});
return this;
@ -2056,6 +2056,7 @@ Y.Base.mix(Y.M.editor_atto.Editor, [EditorFilepicker]);
}, '@VERSION@', {
"requires": [
"node",
"transition",
"io",
"overlay",
"escape",

View File

@ -83,11 +83,11 @@ EditorNotify.prototype = {
if (this.messageOverlay === null) {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide();
this.messageOverlay.hide(true);
this._wrapper.append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide();
this.messageOverlay.hide(true);
}, this);
}
@ -122,12 +122,12 @@ EditorNotify.prototype = {
'</div>');
this.messageOverlay.empty();
this.messageOverlay.append(bodyContent);
this.messageOverlay.show();
this.messageOverlay.show(true);
this.hideTimer = Y.later(intTimeout, this, function() {
Y.log('Hide Atto notification.', 'debug', LOGNAME_NOTIFY);
this.hideTimer = null;
this.messageOverlay.hide();
this.messageOverlay.hide(true);
});
return this;

View File

@ -2,6 +2,7 @@
"moodle-editor_atto-editor": {
"requires": [
"node",
"transition",
"io",
"overlay",
"escape",