[IMP] mail: introduce AttachmentViewer/onClickNext

Task-2579306

Part-of: odoo/odoo#88152
This commit is contained in:
Alexandre Kühn
2022-04-07 14:20:58 +02:00
parent 53fcbb6a5d
commit 1d7a4b7891
3 changed files with 10 additions and 12 deletions
@@ -223,17 +223,6 @@ export class AttachmentViewer extends Component {
this._stopDragging();
}
/**
* Called when clicking on next icon.
*
* @private
* @param {MouseEvent} ev
*/
_onClickNext(ev) {
ev.stopPropagation();
this.attachmentViewer.next();
}
/**
* Called when clicking on previous icon.
*
@@ -87,7 +87,7 @@
<div class="o_AttachmentViewer_buttonNavigation o_AttachmentViewer_buttonNavigationPrevious o_AttachmentViewer_buttonNavigationPreviousIcon btn btn-dark position-absolute top-0 bottom-0 start-0 align-items-center justify-content-center d-flex my-auto ms-3 rounded-circle" t-on-click="_onClickPrevious" title="Previous (Left-Arrow)" role="button">
<span class="fa fa-chevron-left" role="img"/>
</div>
<div class="o_AttachmentViewer_buttonNavigation o_AttachmentViewer_buttonNavigationNext o_AttachmentViewer_buttonNavigationNextIcon btn btn-dark position-absolute top-0 bottom-0 end-0 align-items-center justify-content-center d-flex my-auto me-3 rounded-circle" t-on-click="_onClickNext" title="Next (Right-Arrow)" role="button">
<div class="o_AttachmentViewer_buttonNavigation o_AttachmentViewer_buttonNavigationNext o_AttachmentViewer_buttonNavigationNextIcon btn btn-dark position-absolute top-0 bottom-0 end-0 align-items-center justify-content-center d-flex my-auto me-3 rounded-circle" t-on-click="attachmentViewer.onClickNext" title="Next (Right-Arrow)" role="button">
<span class="fa fa-chevron-right" role="img"/>
</div>
</t>
@@ -82,6 +82,15 @@ registerModel({
}
ev.stopPropagation();
},
/**
* Called when clicking on next icon.
*
* @param {MouseEvent} ev
*/
onClickNext(ev) {
ev.stopPropagation();
this.next();
},
/**
* Called when clicking on embed video player. Stop propagation to prevent
* closing the dialog.