[IMP] mail: introduce AttachmentViewer/onClickRotate
Task-2579306 Part-of: odoo/odoo#88152
This commit is contained in:
@@ -223,17 +223,6 @@ export class AttachmentViewer extends Component {
|
||||
this._stopDragging();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when clicking on rotate icon.
|
||||
*
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onClickRotate(ev) {
|
||||
ev.stopPropagation();
|
||||
this.attachmentViewer.rotate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when clicking on zoom in icon.
|
||||
*
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<div class="o_AttachmentViewer_toolbarButton btn btn-dark p-3 rounded-0" t-att-class="{ o_disabled: attachmentViewer.scale === MIN_SCALE }" t-on-click="_onClickZoomOut" title="Zoom Out (-)" role="button">
|
||||
<i class="fa fa-fw fa-minus" role="img"/>
|
||||
</div>
|
||||
<div class="o_AttachmentViewer_toolbarButton btn btn-dark p-3 rounded-0" t-on-click="_onClickRotate" title="Rotate (r)" role="button">
|
||||
<div class="o_AttachmentViewer_toolbarButton btn btn-dark p-3 rounded-0" t-on-click="attachmentViewer.onClickRotate" title="Rotate (r)" role="button">
|
||||
<i class="fa fa-fw fa-repeat" role="img"/>
|
||||
</div>
|
||||
<div class="o_AttachmentViewer_toolbarButton btn btn-dark p-3 rounded-0" t-on-click="attachmentViewer.onClickPrint" title="Print" role="button">
|
||||
|
||||
@@ -109,6 +109,15 @@ registerModel({
|
||||
ev.stopPropagation();
|
||||
this.print();
|
||||
},
|
||||
/**
|
||||
* Called when clicking on rotate icon.
|
||||
*
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
onClickRotate(ev) {
|
||||
ev.stopPropagation();
|
||||
this.rotate();
|
||||
},
|
||||
/**
|
||||
* Called when clicking on embed video player. Stop propagation to prevent
|
||||
* closing the dialog.
|
||||
|
||||
Reference in New Issue
Block a user