mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-47736_master_fix2' of git://github.com/markn86/moodle
This commit is contained in:
commit
b1b66a3d12
@ -850,11 +850,17 @@ EditorAutosave.prototype = {
|
||||
response_json = JSON.parse(o.responseText);
|
||||
|
||||
// Revert untouched editor contents to an empty string.
|
||||
// Check for FF and Chrome.
|
||||
if (response_json.result === '<p></p>' || response_json.result === '<p><br></p>' ||
|
||||
response_json.result === '<br>') {
|
||||
response_json.result = '';
|
||||
}
|
||||
|
||||
// Check for IE 9 and 10.
|
||||
if (response_json.result === '<p> </p>' || response_json.result === '<p><br> </p>') {
|
||||
response_json.result = '';
|
||||
}
|
||||
|
||||
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);
|
||||
|
File diff suppressed because one or more lines are too long
@ -845,11 +845,17 @@ EditorAutosave.prototype = {
|
||||
response_json = JSON.parse(o.responseText);
|
||||
|
||||
// Revert untouched editor contents to an empty string.
|
||||
// Check for FF and Chrome.
|
||||
if (response_json.result === '<p></p>' || response_json.result === '<p><br></p>' ||
|
||||
response_json.result === '<br>') {
|
||||
response_json.result = '';
|
||||
}
|
||||
|
||||
// Check for IE 9 and 10.
|
||||
if (response_json.result === '<p> </p>' || response_json.result === '<p><br> </p>') {
|
||||
response_json.result = '';
|
||||
}
|
||||
|
||||
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')) {
|
||||
|
@ -146,11 +146,17 @@ EditorAutosave.prototype = {
|
||||
response_json = JSON.parse(o.responseText);
|
||||
|
||||
// Revert untouched editor contents to an empty string.
|
||||
// Check for FF and Chrome.
|
||||
if (response_json.result === '<p></p>' || response_json.result === '<p><br></p>' ||
|
||||
response_json.result === '<br>') {
|
||||
response_json.result = '';
|
||||
}
|
||||
|
||||
// Check for IE 9 and 10.
|
||||
if (response_json.result === '<p> </p>' || response_json.result === '<p><br> </p>') {
|
||||
response_json.result = '';
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user