diff options
| author | Sébastien Theys <seb@odoo.com> | 2019-06-04 15:11:08 +0200 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2019-06-04 22:14:13 +0200 |
| commit | 76cf2ae82a45b9ffcf63b524944a42b7f5192b0c (patch) | |
| tree | 89540178c9e62def90377eb50ea8f7e1c089aff6 /addons/web_unsplash/static/src | |
| parent | 191c556d6b50b35178ea5bb91fb998bcffb86367 (diff) | |
[IMP] web_editor, *: improve media dialog attachment upload
* = web_unsplash, website
Remove iframe upload and replace it with a proper RPC. The route is now only
accepting one file at a time, which makes it easier to maintain, and allows to
process the first file as soon as it is ready, instead of having to wait on
everything.
Also fix a bug where a document could not be uploaded because it would try to
parse it as an image.
Remove filter after search result from the JS and add the corresponding
conditions in the domain to avoid processing and returning unnecessary records.
If multiple attachments exist with the same URL, now display them all to avoid
confusion.
Compute all the necessary values in the python model instead of in the JS.
Allow SVG in the widget (the server already accepted them before).
Disable multiple image upload when not in multiImages mode.
task-1930726
PR: #31208
Diffstat (limited to 'addons/web_unsplash/static/src')
| -rw-r--r-- | addons/web_unsplash/static/src/js/unsplash_image_widget.js | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/addons/web_unsplash/static/src/js/unsplash_image_widget.js b/addons/web_unsplash/static/src/js/unsplash_image_widget.js index 53259e6278b..8244f12b4b9 100644 --- a/addons/web_unsplash/static/src/js/unsplash_image_widget.js +++ b/addons/web_unsplash/static/src/js/unsplash_image_widget.js @@ -92,10 +92,6 @@ widgetsMedia.ImageWidget.include({ query: self._unsplash.query, } }).then(function (images) { - _.each(images, function (image) { - image.src = image.url; - image.isDocument = !(/gif|jpe|jpg|png/.test(image.mimetype)); - }); self.attachments = images; self.selectedAttachments = images; return _super.apply(self, args); |
