From 49ea7b2b413dfcb2290b02eee4b43bfdabd535b2 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Tue, 24 Mar 2020 13:34:17 +0000 Subject: [IMP] web_editor: improve image optimization workflow in media dialog Previously, when selecting an image, the user could optimize their images by clicking a little cog icon in the media dialog. They would also be prompted to optimize their images when uploading them. In most cases, it makes a lot more sense to always save the original in the database, and optimize the original whenever it's dropped in the page automatically. A second problem is that when using the optimization feature, optimized images would be displayed along the originals by default, resulting in a lot of duplicates while browsing the media dialog. This commit changes both of these things: - By default, when uploading an image, the original uploaded image is used. The user can still optimize their image manually through the media-dialog by using the cog icon. When choosing an image in the media-dialog, if it's not already an optimized image, an optimized copy is automatically created and used instead. - Optimized images are now hidden by default, in the media dialog, and can be shown by clicking a checkbox at the top of the modal when in debug mode task-2091417 closes odoo/odoo#45174 --- addons/web_editor/static/src/xml/wysiwyg.xml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'addons/web_editor/static/src/xml') diff --git a/addons/web_editor/static/src/xml/wysiwyg.xml b/addons/web_editor/static/src/xml/wysiwyg.xml index 6b07a92dfcd..677128fb750 100644 --- a/addons/web_editor/static/src/xml/wysiwyg.xml +++ b/addons/web_editor/static/src/xml/wysiwyg.xml @@ -142,7 +142,6 @@ -
@@ -158,7 +157,7 @@
- + @@ -170,12 +169,14 @@ Add URL Search an image The URL does not contain any image. The file will be added in the document section. - - - +
+
+ + +
+
@@ -215,7 +216,7 @@
Width
- +
px
@@ -229,7 +230,7 @@
Height
- +
px
@@ -304,13 +305,15 @@ -
+ +
+ Optimized
-- cgit v1.2.3