Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/1.0.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Igloczek committed Jan 10, 2018
2 parents 0cd8414 + fe0915f commit 227c806
Show file tree
Hide file tree
Showing 6 changed files with 363 additions and 132 deletions.
6 changes: 6 additions & 0 deletions Magento_Theme/requirejs-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var config = {
deps: [
'Magento_Theme/js/responsive',
'Magento_Theme/js/theme'
]
};
77 changes: 77 additions & 0 deletions Magento_Theme/web/js/responsive.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
define([
'jquery',
'matchMedia',
'mage/tabs',
'domReady!'
], function ($, mediaCheck) {
'use strict';

mediaCheck({
media: '(min-width: 768px)',

/**
* Switch to Desktop Version.
*/
entry: function () {
var galleryElement;

(function () {

var productInfoMain = $('.product-info-main'),
productInfoAdditional = $('#product-info-additional');

if (productInfoAdditional.length) {
productInfoAdditional.addClass('hidden');
productInfoMain.removeClass('responsive');
}

})();

galleryElement = $('[data-role=media-gallery]');

if (galleryElement.length && galleryElement.data('mageZoom')) {
galleryElement.zoom('enable');
}

if (galleryElement.length && galleryElement.data('mageGallery')) {
galleryElement.gallery('option', 'disableLinks', true);
galleryElement.gallery('option', 'showNav', false);
galleryElement.gallery('option', 'showThumbs', true);
}
},

/**
* Switch to Mobile Version.
*/
exit: function () {
var galleryElement;

$('.action.toggle.checkout.progress').on('click.gotoCheckoutProgress', function () {
var myWrapper = '#checkout-progress-wrapper';

scrollTo(myWrapper + ' .title');
$(myWrapper + ' .title').addClass('active');
$(myWrapper + ' .content').show();
});

$('body').on('click.checkoutProgress', '#checkout-progress-wrapper .title', function () {
$(this).toggleClass('active');
$('#checkout-progress-wrapper .content').toggle();
});

galleryElement = $('[data-role=media-gallery]');

setTimeout(function () {
if (galleryElement.length && galleryElement.data('mageZoom')) {
galleryElement.zoom('disable');
}

if (galleryElement.length && galleryElement.data('mageGallery')) {
galleryElement.gallery('option', 'disableLinks', false);
galleryElement.gallery('option', 'showNav', true);
galleryElement.gallery('option', 'showThumbs', false);
}
}, 2000);
}
});
});
27 changes: 27 additions & 0 deletions Magento_Theme/web/js/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
define([
'jquery',
'mage/smart-keyboard-handler',
'mage/mage',
'mage/ie-class-fixer',
'domReady!'
], function ($, keyboardHandler) {
'use strict';

if ($('body').hasClass('checkout-cart-index')) {
if ($('#co-shipping-method-form .fieldset.rates').length > 0 &&
$('#co-shipping-method-form .fieldset.rates :checked').length === 0
) {
$('#block-shipping').on('collapsiblecreate', function () {
$('#block-shipping').collapsible('forceActivate');
});
}
}

$('.cart-summary').mage('sticky', {
container: '#maincontent'
});

$('.panel.header > .header.links').clone().appendTo('#store\\.links');

keyboardHandler.apply();
});
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "snowdog/theme-blank-sass",
"description": "SASS based version of Magento 2 Blank theme",
"version": "1.0.3",
"license": "MIT",
"type": "magento2-theme",
"require": {
Expand Down
14 changes: 11 additions & 3 deletions etc/view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<width>140</width>
<height>140</height>
</image>
<image id="cart_cross_sell_products" type="thumbnail">
<width>152</width>
<height>188</height>
<image id="cart_cross_sell_products" type="small_image">
<width>240</width>
<height>300</height>
</image>
<image id="cart_page_product_thumbnail" type="small_image">
<width>110</width>
Expand Down Expand Up @@ -67,10 +67,18 @@
<height>140</height>
</image>
<image id="product_page_image_large" type="image"/>
<image id="product_page_image_large_no_frame" type="image">
<frame>false</frame>
</image>
<image id="product_page_image_medium" type="image">
<width>700</width>
<height>700</height>
</image>
<image id="product_page_image_medium_no_frame" type="image">
<width>700</width>
<height>700</height>
<frame>false</frame>
</image>
<image id="product_page_image_small" type="thumbnail">
<width>90</width>
<height>90</height>
Expand Down
Loading

0 comments on commit 227c806

Please sign in to comment.