summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-06-06 19:23:03 +0200
committerChristophe Simonis <chs@odoo.com>2017-06-06 19:23:03 +0200
commit6f3eada2c3a5c0a21c9b3fef3bef3f655b0892e4 (patch)
tree82d444e6c02f7cb18f41dba24a045ad16d0cd4a4 /addons/website/static/src/js
parent7095cb5af5ddef5e89e2bc1da8add6bfff1ed10e (diff)
parentf687a27b79e2072ffe0de11722fa8ab1f7c9a6fd (diff)
[MERGE] forward port branch saas-15 up to f687a27b79e
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/website.snippets.animation.js4
-rw-r--r--addons/website/static/src/js/website.snippets.editor.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js
index ed4b810179c..0a1cd2e2923 100644
--- a/addons/website/static/src/js/website.snippets.animation.js
+++ b/addons/website/static/src/js/website.snippets.animation.js
@@ -328,7 +328,9 @@ animation.registry.parallax = animation.Class.extend({
if (!this.$bg || !this.$bg.length) {
this.$bg = this.$("> .s_parallax_bg");
if (!this.$bg.length) {
- this.$bg = $("<span/>", {"class": "s_parallax_bg"}).prependTo(this.$target);
+ this.$bg = $('<span/>', {
+ class: 's_parallax_bg' + (this.$target.hasClass('oe_custom_bg') ? ' oe_custom_bg' : ''),
+ }).prependTo(this.$target);
}
}
var urlTarget = this.$target.css("background-image");
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index 083ed195905..0ec8ba7caa7 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -233,6 +233,9 @@ options.registry.carousel = options.registry.slider.extend({
s_option.$target = self.$target.find(".item.active");
s_option.set_active();
s_option.$target.trigger("snippet-option-change", [s_option]);
+ if (opt_name === 'background') {
+ s_option.bind_bg_events();
+ }
});
});
this.$target.trigger('slid.bs.carousel');
@@ -347,7 +350,6 @@ options.registry.parallax = options.Class.extend({
_refresh: function () {
_.defer((function () {
this.$target.data("snippet-view")._rebuild();
- this._update_target_to_bg();
}).bind(this));
},
_toggle_refresh_callback: function (on) {