From 191c556d6b50b35178ea5bb91fb998bcffb86367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Tue, 4 Jun 2019 15:10:53 +0200 Subject: [IMP] web_editor, *: improve file media widget views & selection * = web_unsplash, website_blog Rename "image" to "attachment" when appropriate in FileWidget Improve image selection / highlight code (now based on attachment id) Improve image grid view: - Remove the row mechanism and replace it by a single loop over the images. - Take advantage of row wrap for a responsive display. - Uniformize the height (prevent tall images from moving down everything). - Load a miniature of the images when possible, remove the loading placeholder. This should significantly reduce the download size when opening the dialog, at the cost of CPU usage on the server. - Split the existing image view into one view for the loop and one view for the image itself. This way in a following commit we can reuse the image view when adding a new one, instead of having to render everything again. task-1930726 PR: #31208 --- addons/web_editor/static/src/xml/wysiwyg.xml | 47 +++++++++++++++++++++------- 1 file changed, 36 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 a360ec2daef..9f3101cb1c6 100644 --- a/addons/web_editor/static/src/xml/wysiwyg.xml +++ b/addons/web_editor/static/src/xml/wysiwyg.xml @@ -194,22 +194,47 @@ + -
-
-
- - -
-
+
+
    + + + +
+
+ + + +
  • + +
    + +
    +
  • +
    + + +
    +
    + +
    + + +
    + +
    +
    - - - - + + + This file is a public view attachment. + This file is attached to the current record. + +

    The image could not be deleted because it is used in the -- cgit v1.2.3