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

This commit is contained in:
Marina Glancy 2014-04-01 15:35:05 +08:00
commit 99342b5197
5 changed files with 55 additions and 2 deletions

View file

@ -1,4 +1,9 @@
.atto_image_preview {
max-width: 150px;
max-height: 150px;
margin-bottom: 1em;
}
.editor_atto_content img {
cursor: pointer;
}

View file

@ -192,6 +192,22 @@ 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);
},
/**
* Handle a double click on an image.
*
* @method _handleDoubleClick
* @param {EventFacade} e
* @private
*/
_handleDoubleClick: function(e) {
var image = e.target;
var selection = this.get('host').getSelectionFromNode(image);
this.get('host').setSelection(selection);
this._displayDialogue();
},
/**

File diff suppressed because one or more lines are too long

View file

@ -192,6 +192,22 @@ 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);
},
/**
* Handle a double click on an image.
*
* @method _handleDoubleClick
* @param {EventFacade} e
* @private
*/
_handleDoubleClick: function(e) {
var image = e.target;
var selection = this.get('host').getSelectionFromNode(image);
this.get('host').setSelection(selection);
this._displayDialogue();
},
/**

View file

@ -190,6 +190,22 @@ 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);
},
/**
* Handle a double click on an image.
*
* @method _handleDoubleClick
* @param {EventFacade} e
* @private
*/
_handleDoubleClick: function(e) {
var image = e.target;
var selection = this.get('host').getSelectionFromNode(image);
this.get('host').setSelection(selection);
this._displayDialogue();
},
/**