mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-71751-master' of https://github.com/nguyenphuctien/moodle
This commit is contained in:
commit
d650e65265
@ -280,16 +280,15 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*
|
||||
* @method _handleDragDrop
|
||||
* @param {EventFacade} e
|
||||
* @return {boolean} false if we handled the event, else true.
|
||||
* @private
|
||||
*/
|
||||
_handleDragDrop: function(e) {
|
||||
if (!e._event || !e._event.dataTransfer) {
|
||||
// Drop not fully supported in this browser.
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
return this._handlePasteOrDropHelper(e, e._event.dataTransfer);
|
||||
this._handlePasteOrDropHelper(e, e._event.dataTransfer);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -335,13 +334,7 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
|
||||
if (didUpload) {
|
||||
// We handled this.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
} else {
|
||||
// Let someone else try to handle it.
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -280,16 +280,15 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*
|
||||
* @method _handleDragDrop
|
||||
* @param {EventFacade} e
|
||||
* @return {boolean} false if we handled the event, else true.
|
||||
* @private
|
||||
*/
|
||||
_handleDragDrop: function(e) {
|
||||
if (!e._event || !e._event.dataTransfer) {
|
||||
// Drop not fully supported in this browser.
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
return this._handlePasteOrDropHelper(e, e._event.dataTransfer);
|
||||
this._handlePasteOrDropHelper(e, e._event.dataTransfer);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -335,13 +334,7 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
|
||||
if (didUpload) {
|
||||
// We handled this.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
} else {
|
||||
// Let someone else try to handle it.
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -278,16 +278,15 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*
|
||||
* @method _handleDragDrop
|
||||
* @param {EventFacade} e
|
||||
* @return {boolean} false if we handled the event, else true.
|
||||
* @private
|
||||
*/
|
||||
_handleDragDrop: function(e) {
|
||||
if (!e._event || !e._event.dataTransfer) {
|
||||
// Drop not fully supported in this browser.
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
return this._handlePasteOrDropHelper(e, e._event.dataTransfer);
|
||||
this._handlePasteOrDropHelper(e, e._event.dataTransfer);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -333,13 +332,7 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
|
||||
if (didUpload) {
|
||||
// We handled this.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
} else {
|
||||
// Let someone else try to handle it.
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -174,6 +174,10 @@ M.form_dndupload.init = function(Y, options) {
|
||||
init_page_events: function() {
|
||||
this.Y.on('dragenter', this.drag_enter_page, 'body', this);
|
||||
this.Y.on('dragleave', this.drag_leave_page, 'body', this);
|
||||
this.Y.on('drop', function() {
|
||||
this.pageentercount = 0;
|
||||
this.hide_drop_target();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user