[FIX] website: properly update parralax image

Fixed some issues with parralax image updates:

- Background updated without clicking
- Default wallpaper not coming back
- Background disappearring sometimes
This commit is contained in:
Dharmraj Jhala
2017-06-01 17:09:54 +02:00
committed by qsm-odoo
parent b9e2207267
commit 22745668cf
4 changed files with 4 additions and 4 deletions
@@ -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");
@@ -342,7 +342,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) {
@@ -409,7 +409,6 @@ div.carousel {
background-size: cover;
background-attachment: scroll;
pointer-events: none;
z-index: -1;
}
&.s_parallax_is_fixed > .s_parallax_bg {
background-attachment: fixed;
+1 -1
View File
@@ -528,7 +528,7 @@
</template>
<template id="s_parallax" name="Parallax">
<section class="parallax s_parallax oe_custom_bg oe_img_bg"
<section class="parallax s_parallax oe_img_bg"
style="background-image: url(/web/image/website.s_background_image_04);"
data-scroll-background-ratio="1.6"><div class="oe_structure"/></section>
</template>