From d9c035ae428cb8f57e2bb570aa23c41d6ae00bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Mon, 28 May 2018 14:18:43 +0200 Subject: [PATCH] [FIX] web: do not hide button in pdf viewer in some cases The pdf viewer uses an external library to display a pdf file. This library displays a few controls, such as a 'Download' button. However, this button is sometimes displayed in the top bar, sometimes in the top right dropdown menu (depending on the size of the widget). For some unknown reason, the pdf viewer widget disabled the download button. But this was inconsistent: the download button was only hidden when it was in the tob bar, and not in the dropdown menu. With this commit, we simply remove this behaviour. --- addons/web/static/src/js/fields/basic_fields.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index c2133e3b707..10057d44984 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -1305,9 +1305,6 @@ var FieldPdfViewer = FieldBinaryFile.extend({ * @param {DOMElement} iframe */ _disableButtons: function (iframe) { - if (this.mode === 'readonly') { - $(iframe).contents().find('button#download').hide(); - } $(iframe).contents().find('button#openFile').hide(); }, /**