[IMP] mail: introduce AttachmentViewer/onClickVideo
Task-2579306 Part-of: odoo/odoo#88152
This commit is contained in:
@@ -328,17 +328,6 @@ export class AttachmentViewer extends Component {
|
||||
this._rotate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when clicking on embed video player. Stop propagation to prevent
|
||||
* closing the dialog.
|
||||
*
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onClickVideo(ev) {
|
||||
ev.stopPropagation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when clicking on zoom in icon.
|
||||
*
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<iframe allow="autoplay; encrypted-media" class="o_AttachmentViewer_view o_AttachmentViewer_viewIframe o_AttachmentViewer_youtube w-75 h-100 bg-black border-0" t-att-src="attachmentViewer.attachment.defaultSource" height="315" width="560"/>
|
||||
</t>
|
||||
<t t-if="attachmentViewer.attachment.isVideo">
|
||||
<video class="o_AttachmentViewer_view o_AttachmentViewer_viewVideo w-75 h-75 bg-black" t-att-class="{ 'o-isMobile w-100 h-100': messaging.device.isMobile }" t-on-click="_onClickVideo" controls="controls">
|
||||
<video class="o_AttachmentViewer_view o_AttachmentViewer_viewVideo w-75 h-75 bg-black" t-att-class="{ 'o-isMobile w-100 h-100': messaging.device.isMobile }" t-on-click="attachmentViewer.onClickVideo" controls="controls">
|
||||
<source t-att-data-type="attachmentViewer.attachment.mimetype" t-att-src="attachmentViewer.attachment.defaultSource"/>
|
||||
</video>
|
||||
</t>
|
||||
|
||||
@@ -65,7 +65,7 @@ registerModel({
|
||||
* Called when clicking on image. Stop propagation of event to prevent
|
||||
* closing the dialog.
|
||||
*
|
||||
* @param {MouseEvent} ev
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
onClickImage(ev) {
|
||||
if (this.isDragging) {
|
||||
@@ -73,6 +73,15 @@ registerModel({
|
||||
}
|
||||
ev.stopPropagation();
|
||||
},
|
||||
/**
|
||||
* Called when clicking on embed video player. Stop propagation to prevent
|
||||
* closing the dialog.
|
||||
*
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
onClickVideo(ev) {
|
||||
ev.stopPropagation();
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @returns {string}
|
||||
|
||||
Reference in New Issue
Block a user