summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-11-12 13:06:48 +0100
committerChristophe Simonis <chs@odoo.com>2018-11-12 13:06:48 +0100
commit99d0e1b80e5b2d5eb59b96c6ce1bf246f8df2326 (patch)
tree6c53282f8a22e9b59d83762ebe057173172c5f63 /addons/website/static/src/js
parent4d53266e236d1816e45b13aa50bcafb1bab2bc8c (diff)
parenta403155dec769418ede3c9128a887847f97a956f (diff)
[MERGE] forward port branch 12.0 up to a403155dec7
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/content/snippets.animation.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js
index 2833e5b5318..a0b25c75b01 100644
--- a/addons/website/static/src/js/content/snippets.animation.js
+++ b/addons/website/static/src/js/content/snippets.animation.js
@@ -435,6 +435,7 @@ registry.slider = Animation.extend({
*/
start: function () {
if (!this.editableMode) {
+ this.$('img').on('load.slider', this._onImageLoaded.bind(this));
this._computeHeights();
}
this.$target.carousel();
@@ -445,6 +446,7 @@ registry.slider = Animation.extend({
*/
destroy: function () {
this._super.apply(this, arguments);
+ this.$('img').off('.slider');
this.$target.carousel('pause');
this.$target.removeData('bs.carousel');
_.each(this.$('.carousel-item'), function (el) {
@@ -487,6 +489,12 @@ registry.slider = Animation.extend({
_onEditionSlide: function () {
this._computeHeights();
},
+ /**
+ * @private
+ */
+ _onImageLoaded: function () {
+ this._computeHeights();
+ },
});
registry.parallax = Animation.extend({