summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/website.editor.js3
-rw-r--r--addons/website/static/src/js/website.snippets.editor.js16
2 files changed, 5 insertions, 14 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index c89bf9ec2fb..ae126ad16ab 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -1789,6 +1789,9 @@
if (node.nodeName === 'BR' && node.getAttribute('type') === '_moz') {
// <br type="_moz"> appears when focusing RTE in FF, ignore
continue;
+ } else if (node.nodeName === 'DIV' && $(node).hasClass('oe_drop_zone')) {
+ // ignore dropzone inserted by snippets
+ continue
}
}
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index 1eee1fee65b..084dcd0b249 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -19,23 +19,11 @@
edit: function () {
var self = this;
$("[data-oe-model] *, [data-oe-type=html] *").off('click');
- website.snippet.stop_animation();
window.snippets = this.snippets = new website.snippet.BuildingBlock(this);
this.snippets.appendTo(this.$el);
this.on('rte:ready', this, function () {
self.snippets.$button.removeClass("hidden");
- website.snippet.start_animation();
- $(website.snippet.readyAnimation).each(function() {
- var animation = $(this).data("snippet-view");
- if (animation) {
- animation.$target.on('focus', '*', function(){
- animation.stop();
- });
- animation.$target.on('blur', '*', function(){
- animation.start();
- });
- }
- });
+ website.snippet.stop_animation();
});
return this._super.apply(this, arguments);
@@ -397,7 +385,6 @@
$("#oe_snippets").trigger('snippet-dropped', $target);
website.snippet.start_animation(true, $target);
-
// drop_and_build_snippet
self.create_overlay($target);
if ($target.data("snippet-editor")) {
@@ -1291,6 +1278,7 @@
this.grid.size = 8;
return this.grid;
},
+ this.$target.carousel({interval: false});
});
website.snippet.options.parallax = website.snippet.Option.extend({