[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:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user