summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_image_gallery/000.js
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2020-02-03 14:35:16 +0000
committerqsm-odoo <qsm@odoo.com>2020-07-17 11:28:11 +0000
commitef9cc134b649852a9df81fd3a4c16cb4aee43aa7 (patch)
treefe89a7d57c6415d3a2db16620150cbcad592d9e3 /addons/website/static/src/snippets/s_image_gallery/000.js
parent7a36eee043b70507ba8af554d286beb1626e81ef (diff)
[IMP] website: review gallery snippet
Review the gallery snippet. It has been improved in multiple ways. Added new options, etc. Part of https://github.com/odoo/odoo/pull/45096 task-2162952
Diffstat (limited to 'addons/website/static/src/snippets/s_image_gallery/000.js')
-rw-r--r--addons/website/static/src/snippets/s_image_gallery/000.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/addons/website/static/src/snippets/s_image_gallery/000.js b/addons/website/static/src/snippets/s_image_gallery/000.js
index 19e98a7b341..7d1ee4ea386 100644
--- a/addons/website/static/src/snippets/s_image_gallery/000.js
+++ b/addons/website/static/src/snippets/s_image_gallery/000.js
@@ -7,7 +7,7 @@ var publicWidget = require('web.public.widget');
var qweb = core.qweb;
const GalleryWidget = publicWidget.Widget.extend({
- selector: '.o_gallery:not(.o_slideshow)',
+ selector: '.s_image_gallery:not(.o_slideshow)',
xmlDependencies: ['/website/static/src/xml/website.gallery.xml'],
events: {
'click img': '_onClickImg',
@@ -28,9 +28,7 @@ const GalleryWidget = publicWidget.Widget.extend({
var self = this;
var $cur = $(ev.currentTarget);
- var milliseconds = undefined;
- var params = undefined;
- var $images = $cur.closest('.o_gallery').find('img');
+ var $images = $cur.closest('.s_image_gallery').find('img');
var size = 0.8;
var dimensions = {
min_width: Math.round(window.innerWidth * size * 0.9),
@@ -43,7 +41,7 @@ const GalleryWidget = publicWidget.Widget.extend({
var $img = ($cur.is('img') === true) ? $cur : $cur.closest('img');
- milliseconds = $cur.closest('.o_gallery').data('interval') || false;
+ const milliseconds = $cur.closest('.s_image_gallery').data('interval') || false;
var $modal = $(qweb.render('website.gallery.slideshow.lightbox', {
images: $images.get(),
index: $images.index($img),