summaryrefslogtreecommitdiff
path: root/addons/web_unsplash/static/src
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2019-06-11 16:08:38 +0000
committerfja-odoo <fja@odoo.com>2019-06-19 14:55:30 +0000
commit4ebda2ec2be55df3b900747ffb1d60e4b3f70691 (patch)
tree74bba497f862042d05f4e09e29017bf2ae964cc8 /addons/web_unsplash/static/src
parent16ee1966af50e22cc54d4c00747ba6d241f4e4a1 (diff)
[FIX] web_editor, web_unsplash: fix nested div
The div that is replaced with the existing.attachments template was not the right target and kept nesting div into each other. The parent div of the existing.attachments now has the o_we_existing_attachments class (the target to be replaced by itself). Part of #33983
Diffstat (limited to 'addons/web_unsplash/static/src')
-rw-r--r--addons/web_unsplash/static/src/js/unsplash_image_widget.js2
-rw-r--r--addons/web_unsplash/static/src/xml/unsplash_image_widget.xml2
2 files changed, 2 insertions, 2 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 8244f12b4b9..8fb78e7ccb6 100644
--- a/addons/web_unsplash/static/src/js/unsplash_image_widget.js
+++ b/addons/web_unsplash/static/src/js/unsplash_image_widget.js
@@ -177,7 +177,7 @@ widgetsMedia.ImageWidget.include({
*/
_toggleUnsplashContainer: function (show) {
this._unsplash.isActive = show;
- this.$('.existing-attachments').toggleClass('d-none', show);
+ this.$('.o_we_existing_attachments').toggleClass('d-none', show);
this.$('.unsplash_img_container').toggleClass('d-none', !show);
this.$('.o_we_search_icon > span').text(show ? "Unsplash" : "");
},
diff --git a/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml b/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
index 73593b25e50..5610e977b9b 100644
--- a/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
+++ b/addons/web_unsplash/static/src/xml/unsplash_image_widget.xml
@@ -2,7 +2,7 @@
<templates id="template" xml:space="preserve">
<t t-extend="wysiwyg.widgets.file">
- <t t-jquery=".existing-attachments" t-operation="after">
+ <t t-jquery=".o_we_existing_attachments" t-operation="after">
<div class="unsplash_img_container"></div>
</t>
</t>