[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:
chm@openerp.com 2014-04-09 09:28:13 +02:00
parent 41d172ea6d
commit 3993d1ce2f
1 changed files with 3 additions and 3 deletions

View File

@ -1441,6 +1441,9 @@
start : function () {
var self = this;
this._super();
if (!self.$target.data("snippet-view")) {
this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target));
}
this.scroll();
this.$target.on('snippet-style-change snippet-style-preview', function () {
self.$target.data("snippet-view").set_values();
@ -1472,9 +1475,6 @@
this.$target.find(".parallax")
.css("background-position", '')
.removeAttr("data-scroll-background-offset");
},
_drag_and_drop: function(){
this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target));
}
});