From 0a0341ee6a3b68144fb5d93ea3664e9406bc3cde Mon Sep 17 00:00:00 2001 From: Younn Olivier Date: Thu, 11 Feb 2021 07:52:53 +0000 Subject: [PATCH] [FIX] web_editor: update the media search bar layout Before, depending on the screen size, it was not always clear for the user that he can use the search bar to find library images. The upload buttons and search bars have been switched in order to make the search the first choice for the user. Also, make the arrow pointing at the searchbar more understandable. task-2446852 closes odoo/odoo#68821 X-original-commit: 4237916d1f103baef5760e8508c9ebd5e91ac163 Signed-off-by: Quentin Smetz (qsm) --- .../static/src/js/wysiwyg/widgets/media.js | 1 + .../static/src/scss/web_editor.common.scss | 6 +++-- addons/web_editor/static/src/xml/wysiwyg.xml | 23 ++++++++++--------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/media.js b/addons/web_editor/static/src/js/wysiwyg/widgets/media.js index d823a337b3e..dd0819022ea 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/media.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/media.js @@ -1066,6 +1066,7 @@ var ImageWidget = FileWidget.extend({ _onSearchInput: function (ev) { this.libraryMedia = []; this._super(...arguments); + this.$('.o_we_search_select').removeClass('d-none'); }, /** * @override diff --git a/addons/web_editor/static/src/scss/web_editor.common.scss b/addons/web_editor/static/src/scss/web_editor.common.scss index 836d52d1de3..c393e0988d9 100644 --- a/addons/web_editor/static/src/scss/web_editor.common.scss +++ b/addons/web_editor/static/src/scss/web_editor.common.scss @@ -481,16 +481,18 @@ a.o_underline { width: 100%; display: flex; align-items: center; - justify-content: center; + justify-content: flex-start; & > h2 { max-width: 500px; text-align: center; + margin-left: 150px; } &::before { + transform: scale(-1, 1); content: ""; - @include o-position-absolute($top: 0, $right: 50px); + @include o-position-absolute($top: 0, $left: 50px); width: 100px; height: 150px; opacity: .5; diff --git a/addons/web_editor/static/src/xml/wysiwyg.xml b/addons/web_editor/static/src/xml/wysiwyg.xml index 76a23984254..49090d179c3 100644 --- a/addons/web_editor/static/src/xml/wysiwyg.xml +++ b/addons/web_editor/static/src/xml/wysiwyg.xml @@ -125,7 +125,7 @@ -
+
@@ -152,13 +152,10 @@
- + + -
- -
+
@@ -173,8 +170,12 @@
- - + +
+ +
@@ -186,14 +187,14 @@ Search an image Uploaded image's format is not supported. Try with: -
+
-