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

This commit is contained in:
Marina Glancy 2014-11-04 10:47:09 +08:00
commit 1d9155872f
4 changed files with 8 additions and 5 deletions

View File

@ -864,7 +864,8 @@ EditorAutosave.prototype = {
if (response_json.error || typeof response_json.result === 'undefined') {
Y.log('Error occurred recovering draft text: ' + response_json.error, 'debug', LOGNAME_AUTOSAVE);
this.showMessage(M.util.get_string('errortextrecovery', 'editor_atto'), NOTIFY_WARNING, RECOVER_MESSAGE_TIMEOUT);
} else if (response_json.result !== this.textarea.get('value')) {
} else if (response_json.result !== this.textarea.get('value') &&
response_json.result !== '') {
Y.log('Autosave text found - recover it.', 'debug', LOGNAME_AUTOSAVE);
this.recoverText(response_json.result);
}

File diff suppressed because one or more lines are too long

View File

@ -858,7 +858,8 @@ EditorAutosave.prototype = {
if (response_json.error || typeof response_json.result === 'undefined') {
this.showMessage(M.util.get_string('errortextrecovery', 'editor_atto'), NOTIFY_WARNING, RECOVER_MESSAGE_TIMEOUT);
} else if (response_json.result !== this.textarea.get('value')) {
} else if (response_json.result !== this.textarea.get('value') &&
response_json.result !== '') {
this.recoverText(response_json.result);
}
this._fireSelectionChanged();

View File

@ -160,7 +160,8 @@ EditorAutosave.prototype = {
if (response_json.error || typeof response_json.result === 'undefined') {
Y.log('Error occurred recovering draft text: ' + response_json.error, 'debug', LOGNAME_AUTOSAVE);
this.showMessage(M.util.get_string('errortextrecovery', 'editor_atto'), NOTIFY_WARNING, RECOVER_MESSAGE_TIMEOUT);
} else if (response_json.result !== this.textarea.get('value')) {
} else if (response_json.result !== this.textarea.get('value') &&
response_json.result !== '') {
Y.log('Autosave text found - recover it.', 'debug', LOGNAME_AUTOSAVE);
this.recoverText(response_json.result);
}