[FIX] website: snippet parallax. Error when the user activate a snippet parallax already inserted
bzr revid: chm@openerp.com-20140409072813-43fqwcr7j6i0zl0e
This commit is contained in:
parent
41d172ea6d
commit
3993d1ce2f
|
@ -1441,6 +1441,9 @@
|
||||||
start : function () {
|
start : function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
this._super();
|
this._super();
|
||||||
|
if (!self.$target.data("snippet-view")) {
|
||||||
|
this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target));
|
||||||
|
}
|
||||||
this.scroll();
|
this.scroll();
|
||||||
this.$target.on('snippet-style-change snippet-style-preview', function () {
|
this.$target.on('snippet-style-change snippet-style-preview', function () {
|
||||||
self.$target.data("snippet-view").set_values();
|
self.$target.data("snippet-view").set_values();
|
||||||
|
@ -1472,9 +1475,6 @@
|
||||||
this.$target.find(".parallax")
|
this.$target.find(".parallax")
|
||||||
.css("background-position", '')
|
.css("background-position", '')
|
||||||
.removeAttr("data-scroll-background-offset");
|
.removeAttr("data-scroll-background-offset");
|
||||||
},
|
|
||||||
_drag_and_drop: function(){
|
|
||||||
this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue