summaryrefslogtreecommitdiff
path: root/addons/web_unsplash/controllers
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-06-04 15:10:53 +0200
committerSébastien Theys <seb@odoo.com>2019-06-04 22:14:13 +0200
commit191c556d6b50b35178ea5bb91fb998bcffb86367 (patch)
tree39a4a2565f405de2c36e274f3d062e3a9031517c /addons/web_unsplash/controllers
parent86d304fdb0c93fa3af0f2649882304c0ddabe896 (diff)
[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
Diffstat (limited to 'addons/web_unsplash/controllers')
-rw-r--r--addons/web_unsplash/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_unsplash/controllers/main.py b/addons/web_unsplash/controllers/main.py
index ddebf07e327..c9a2deb631e 100644
--- a/addons/web_unsplash/controllers/main.py
+++ b/addons/web_unsplash/controllers/main.py
@@ -116,7 +116,7 @@ class Web_Unsplash(http.Controller):
'res_model': res_model,
})
attachment.generate_access_token()
- uploads.extend(attachment.read(['name', 'mimetype', 'checksum', 'res_id', 'res_model', 'access_token', 'url']))
+ uploads.extend(attachment.read(['name', 'mimetype', 'checksum', 'url', 'type', 'res_id', 'res_model', 'access_token']))
# Notifies Unsplash from an image download. (API requirement)
self._notify_download(value.get('download_url'))