From 060ed3de7fb7e603e1caf9ec7ae1652cb7cee820 Mon Sep 17 00:00:00 2001 From: Uladzislau Harbachou Date: Mon, 21 Dec 2015 20:22:48 +0300 Subject: [PATCH 1/2] JS-323: Gallery setting for configurable product - Static test fix --- .../view/frontend/web/js/fotorama-add-video-events.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js b/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js index bd80f02aa7358..891885a81eb8b 100644 --- a/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js +++ b/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js @@ -366,8 +366,7 @@ define([ t, tmpVideoData, currentItem, - iconClass = 'video-thumb-icon', - videoContainerClass = 'fotorama-video-container'; + iconClass = 'video-thumb-icon'; if (!fotorama.activeFrame.$navThumbFrame) { $(this.element).on('fotorama:showend', $.proxy(function (evt, fotoramaData) { From e8b7b0034ab09a3bd2c15dc02c2bd47c42149479 Mon Sep 17 00:00:00 2001 From: Uladzislau Harbachou Date: Mon, 21 Dec 2015 20:23:24 +0300 Subject: [PATCH 2/2] JS-323: Gallery setting for configurable product - Static test improvment --- .../Swatches/view/frontend/web/js/swatch-renderer.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index 74c4f63bcf520..b6da3a8642bd4 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -912,7 +912,8 @@ define([ var justAnImage = images[0], updateImg, imagesToUpdate, - gallery = context.find(this.options.mediaGallerySelector).data('gallery'); + gallery = context.find(this.options.mediaGallerySelector).data('gallery'), + item; if (images) { imagesToUpdate = this._setImageType($.extend(true, [], images)); @@ -924,11 +925,8 @@ define([ return img.isMain; }); - if (updateImg.length) { - gallery.updateDataByIndex(0, updateImg[0]); - } else { - gallery.updateDataByIndex(0, imagesToUpdate[0]); - } + item = updateImg.length ? updateImg[0]: imagesToUpdate[0]; + gallery.updateDataByIndex(0, item); gallery.seek(1); } else {