From 82b64a2f7e5a889469e3e2174a95426d1957df23 Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Sun, 2 Jun 2019 11:07:25 +0000 Subject: [PATCH] publish muk_web_utils - 12.0 --- muk_web_utils/__manifest__.py | 2 +- muk_web_utils/static/src/js/fields/binary.js | 6 +++++ muk_web_utils/static/src/scss/binary.scss | 25 ++++++++++++++++++++ muk_web_utils/template/assets.xml | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 muk_web_utils/static/src/scss/binary.scss diff --git a/muk_web_utils/__manifest__.py b/muk_web_utils/__manifest__.py index e9442e2..4dee688 100644 --- a/muk_web_utils/__manifest__.py +++ b/muk_web_utils/__manifest__.py @@ -20,7 +20,7 @@ { "name": "MuK Web Utils", "summary": """Utility Features""", - "version": "12.0.2.9.6", + "version": "12.0.2.9.7", "category": "Extra Tools", "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_web_utils/static/src/js/fields/binary.js b/muk_web_utils/static/src/js/fields/binary.js index 0b713a5..39ada59 100644 --- a/muk_web_utils/static/src/js/fields/binary.js +++ b/muk_web_utils/static/src/js/fields/binary.js @@ -49,6 +49,12 @@ fields.FieldBinaryFile.include({ $wrapper.append(this.$el); this.setElement($wrapper); }, + _renderEdit: function () { + this._super.apply(this, arguments); + if (this.nodeOptions && this.nodeOptions.accept) { + this.$('input[name="ufile"]').prop("accept", this.nodeOptions.accept); + } + }, }); var FieldBinarySize = fields.FieldFloat.extend({ diff --git a/muk_web_utils/static/src/scss/binary.scss b/muk_web_utils/static/src/scss/binary.scss new file mode 100644 index 0000000..780f924 --- /dev/null +++ b/muk_web_utils/static/src/scss/binary.scss @@ -0,0 +1,25 @@ +/********************************************************************************** +* +* Copyright (C) 2017 MuK IT GmbH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see . +* +**********************************************************************************/ + +.o_list_view .o_field_widget.o_field_binary_file { + height: 100%; + button.btn { + padding-top: 0.25rem; + } +} diff --git a/muk_web_utils/template/assets.xml b/muk_web_utils/template/assets.xml index a0b986f..0ae74d1 100644 --- a/muk_web_utils/template/assets.xml +++ b/muk_web_utils/template/assets.xml @@ -36,6 +36,7 @@ +