Merge branch 'MDL-49256-master' of git://github.com/andrewnicols/moodle

Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
This commit is contained in:
David Monllao 2015-03-10 17:42:35 +08:00
commit ceba96bbca
4 changed files with 18 additions and 6 deletions

View File

@ -828,6 +828,7 @@ EditorAutosave.prototype = {
*/
setupAutosave: function() {
var draftid = -1,
form,
optiontype = null,
options = this.get('filepickeroptions'),
params,
@ -906,7 +907,10 @@ EditorAutosave.prototype = {
Y.later(delay, this, this.saveDraft, false, true);
// Now setup the listener for form submission.
this.textarea.ancestor('form').on('submit', this.resetAutosave, this);
form = this.textarea.ancestor('form');
if (form) {
form.on('submit', this.resetAutosave, this);
}
return this;
},

File diff suppressed because one or more lines are too long

View File

@ -823,6 +823,7 @@ EditorAutosave.prototype = {
*/
setupAutosave: function() {
var draftid = -1,
form,
optiontype = null,
options = this.get('filepickeroptions'),
params,
@ -899,7 +900,10 @@ EditorAutosave.prototype = {
Y.later(delay, this, this.saveDraft, false, true);
// Now setup the listener for form submission.
this.textarea.ancestor('form').on('submit', this.resetAutosave, this);
form = this.textarea.ancestor('form');
if (form) {
form.on('submit', this.resetAutosave, this);
}
return this;
},

View File

@ -107,6 +107,7 @@ EditorAutosave.prototype = {
*/
setupAutosave: function() {
var draftid = -1,
form,
optiontype = null,
options = this.get('filepickeroptions'),
params,
@ -185,7 +186,10 @@ EditorAutosave.prototype = {
Y.later(delay, this, this.saveDraft, false, true);
// Now setup the listener for form submission.
this.textarea.ancestor('form').on('submit', this.resetAutosave, this);
form = this.textarea.ancestor('form');
if (form) {
form.on('submit', this.resetAutosave, this);
}
return this;
},