[FIX] website.snippet: can't edit content of the banner. (+ better fix for backward...
authorChristophe Matthieu <chm@odoo.com>
Tue, 14 Oct 2014 07:17:01 +0000 (09:17 +0200)
committerChristophe Matthieu <chm@odoo.com>
Tue, 14 Oct 2014 07:17:01 +0000 (09:17 +0200)
addons/website/static/src/js/website.snippets.editor.js

index dc1c782..480dc7a 100644 (file)
                 self.$target.carousel(+$(this).data('slide-to')); });
 
             this.$target.attr('contentEditable', 'false');
-            this.$target.find('.oe_structure, .content>.row, [data-slide]').attr('contentEditable', 'true');
+            this.$target.find('.oe_structure, .content.row, [data-slide]').attr('contentEditable', 'true');
         },
         clean_for_save: function () {
             this._super();
             this._super();
 
             /* Fix: backward compatibility saas-3 */
-            this.$target.find('.item.text_image .container').find('> .carousel-caption > div, > img.carousel-image').attr('contentEditable', 'true');
+            this.$target.find('.item.text_image, .item.image_text, .item.text_only').find('.container > .carousel-caption > div, .container > img.carousel-image').attr('contentEditable', 'true');
         },
     });