diff options
| author | len-odoo <len@odoo.com> | 2018-09-25 13:52:46 +0000 |
|---|---|---|
| committer | len-odoo <len@odoo.com> | 2018-09-26 14:14:14 +0000 |
| commit | fd122aec52166a2d19fe80579dbf9c98c6ab41fa (patch) | |
| tree | 082da93c943ca99ea13acb7d61a147513b105a4b /addons/website/static/src/js | |
| parent | 09340bb7f0da35cc69e24f16e5262ec4825bc0c6 (diff) | |
[FIX] website: fix image carousel
We fix a number of problems:
- grayscale filter not being applied except on desktop Firefox
- incorrect vertical-align on iOS
- image sliders being displayed below the margin on iOS
- carousel indicators flickering at initial load
- very short indicator panel, almost unusable on mobile
- misaligned indicators because of first margin
There are two modes on which these fixes apply:
- image gallery in slideshow
- slideshow in modal
(e.g. obtained by clicking on the gallery set on masonry mode)
Note that due to a refactoring, the gallerySlider was not loaded in the modal,
completely breaking the indicators.
Coauthored by @nle-odoo
opw 1874274
closes odoo/odoo#27226
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/content/snippets.animation.js | 8 |
1 files changed, 7 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 d9dc076f596..9f4a1566d35 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -678,6 +678,7 @@ registry.gallery = Animation.extend({ * @param {Event} ev */ _onClickImg: function (ev) { + var self = this; var $cur = $(ev.currentTarget); var urls = []; @@ -722,7 +723,12 @@ registry.gallery = Animation.extend({ $modal.find('.modal-content, .modal-body.o_slideshow').css('height', '100%'); $modal.appendTo(document.body); - this.carousel = new registry.gallery_slider($modal.find('.carousel').carousel()); + $modal.one('shown.bs.modal', function () { + self.trigger_up('animation_start_demand', { + editableMode: false, + $target: $modal.find('.modal-body.o_slideshow'), + }); + }); }, }); |
