Merge branch 'MDL-47060-master' of git://github.com/damyon/moodle

This commit is contained in:
Marina Glancy
2014-09-08 12:57:41 +08:00
5 changed files with 18 additions and 9 deletions
@@ -539,7 +539,7 @@ EditorNotify.prototype = {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide(true);
this._wrapper.append(this.messageOverlay);
this.textarea.get('parentNode').append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide(true);
@@ -919,7 +919,10 @@ EditorAutosave.prototype = {
* @chainable
*/
saveDraft: function() {
this.updateOriginal();
// Only copy the text from the div to the textarea if the textarea is not currently visible.
if (!this.editor.get('hidden')) {
this.updateOriginal();
}
var newText = this.textarea.get('value');
if (newText !== this.lastText) {
File diff suppressed because one or more lines are too long
@@ -536,7 +536,7 @@ EditorNotify.prototype = {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide(true);
this._wrapper.append(this.messageOverlay);
this.textarea.get('parentNode').append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide(true);
@@ -913,7 +913,10 @@ EditorAutosave.prototype = {
* @chainable
*/
saveDraft: function() {
this.updateOriginal();
// Only copy the text from the div to the textarea if the textarea is not currently visible.
if (!this.editor.get('hidden')) {
this.updateOriginal();
}
var newText = this.textarea.get('value');
if (newText !== this.lastText) {
+4 -1
View File
@@ -215,7 +215,10 @@ EditorAutosave.prototype = {
* @chainable
*/
saveDraft: function() {
this.updateOriginal();
// Only copy the text from the div to the textarea if the textarea is not currently visible.
if (!this.editor.get('hidden')) {
this.updateOriginal();
}
var newText = this.textarea.get('value');
if (newText !== this.lastText) {
+1 -1
View File
@@ -84,7 +84,7 @@ EditorNotify.prototype = {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide(true);
this._wrapper.append(this.messageOverlay);
this.textarea.get('parentNode').append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide(true);