From 36495ef59de0112443235d57a9ef65eea950a5c7 Mon Sep 17 00:00:00 2001 From: Romeo Fragomeli Date: Tue, 3 Aug 2021 11:56:32 +0000 Subject: [PATCH] [IMP] web: Add zoom on employee avatar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit enables the zoom on mobile. To avoid any issue in website, we first only activate it in the backend. Note that it's not, strictly speaking, a zoom. It only shows the original size of the picture. Steps to reproduce: * Open Employee * Select an employee * Touch on the photos closes odoo/odoo#75785 Signed-off-by: Adrien Dieudonné (adr) --- addons/web/static/src/legacy/js/fields/basic_fields.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/legacy/js/fields/basic_fields.js b/addons/web/static/src/legacy/js/fields/basic_fields.js index 7be1fde08a0..5fbc07e26f4 100644 --- a/addons/web/static/src/legacy/js/fields/basic_fields.js +++ b/addons/web/static/src/legacy/js/fields/basic_fields.js @@ -2198,6 +2198,7 @@ var FieldBinaryImage = AbstractFieldBinary.extend({ timer: zoomDelay, attach: '.o_content', attachToTarget: true, + disabledOnMobile: false, onShow: function () { var zoomHeight = Math.ceil(this.$zoom.height()); var zoomWidth = Math.ceil(this.$zoom.width());