Merge branch 'MDL-48062-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE
This commit is contained in:
Vendored
+8
-6
@@ -212,22 +212,24 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
tags: 'img',
|
||||
tagMatchRequiresAll: false
|
||||
});
|
||||
this.editor.delegate('dblclick', this._handleDoubleClick, 'img', this);
|
||||
this.editor.delegate('dblclick', this._displayDialogue, 'img', this);
|
||||
this.editor.delegate('click', this._handleClick, 'img', this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle a double click on an image.
|
||||
* Handle a click on an image.
|
||||
*
|
||||
* @method _handleDoubleClick
|
||||
* @method _handleClick
|
||||
* @param {EventFacade} e
|
||||
* @private
|
||||
*/
|
||||
_handleDoubleClick: function(e) {
|
||||
_handleClick: function(e) {
|
||||
var image = e.target;
|
||||
|
||||
var selection = this.get('host').getSelectionFromNode(image);
|
||||
this.get('host').setSelection(selection);
|
||||
this._displayDialogue();
|
||||
if (this.get('host').getSelection() !== selection) {
|
||||
this.get('host').setSelection(selection);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+8
-6
@@ -212,22 +212,24 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
tags: 'img',
|
||||
tagMatchRequiresAll: false
|
||||
});
|
||||
this.editor.delegate('dblclick', this._handleDoubleClick, 'img', this);
|
||||
this.editor.delegate('dblclick', this._displayDialogue, 'img', this);
|
||||
this.editor.delegate('click', this._handleClick, 'img', this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle a double click on an image.
|
||||
* Handle a click on an image.
|
||||
*
|
||||
* @method _handleDoubleClick
|
||||
* @method _handleClick
|
||||
* @param {EventFacade} e
|
||||
* @private
|
||||
*/
|
||||
_handleDoubleClick: function(e) {
|
||||
_handleClick: function(e) {
|
||||
var image = e.target;
|
||||
|
||||
var selection = this.get('host').getSelectionFromNode(image);
|
||||
this.get('host').setSelection(selection);
|
||||
this._displayDialogue();
|
||||
if (this.get('host').getSelection() !== selection) {
|
||||
this.get('host').setSelection(selection);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,22 +210,24 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
tags: 'img',
|
||||
tagMatchRequiresAll: false
|
||||
});
|
||||
this.editor.delegate('dblclick', this._handleDoubleClick, 'img', this);
|
||||
this.editor.delegate('dblclick', this._displayDialogue, 'img', this);
|
||||
this.editor.delegate('click', this._handleClick, 'img', this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle a double click on an image.
|
||||
* Handle a click on an image.
|
||||
*
|
||||
* @method _handleDoubleClick
|
||||
* @method _handleClick
|
||||
* @param {EventFacade} e
|
||||
* @private
|
||||
*/
|
||||
_handleDoubleClick: function(e) {
|
||||
_handleClick: function(e) {
|
||||
var image = e.target;
|
||||
|
||||
var selection = this.get('host').getSelectionFromNode(image);
|
||||
this.get('host').setSelection(selection);
|
||||
this._displayDialogue();
|
||||
if (this.get('host').getSelection() !== selection) {
|
||||
this.get('host').setSelection(selection);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user