diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-11-02 13:44:53 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-11-02 13:44:53 +0100 |
| commit | 9a32dacd8c30860b24ea191f16f7d0ade6d9c3b2 (patch) | |
| tree | 6fe30958ff15bbd759563d06f0b6a1813d95247a /addons/website/static/src/js | |
| parent | dafc3fb7928b3e1325d61060f7402fb148675347 (diff) | |
| parent | ee2b9fae3519c2494f34dacf15d0a3b5bd8fbd06 (diff) | |
[MERGE] forward port branch 11.0 up to ee2b9fae351
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/content/snippets.animation.js | 7 | ||||
| -rw-r--r-- | addons/website/static/src/js/editor/snippets.options.js | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js index 466913e7188..725b6b1d66b 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -343,12 +343,19 @@ var Animation = Widget.extend({ * Also stops animation effects and destroys them if any. */ destroy: function () { + var $oldel = this.$el; // The difference with the default behavior is that we unset the // associated element first so that: // 1) its events are unbinded // 2) it is not removed from the DOM this.setElement(null); this._super.apply(this, arguments); + // Reassign the variables afterwards to allow extensions to use them + // after calling the _super method + this.$el = $oldel; + this.el = $oldel[0]; + this.$target = this.$el; + this.target = this.el; }, /** * @override diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index dfe5387976e..451d4faceff 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -341,7 +341,7 @@ options.registry.parallax = options.Class.extend({ this.trigger_up('option_update', { optionNames: ['background', 'background_position'], name: 'target', - data: this.$target.data('snippet-view').$bg, + data: this.$target.find('> .s_parallax_bg'), }); this._refresh(); }, |
