Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup base theme JavaScript modules #27617

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

var config = {
deps: [
'Magento_Theme/js/responsive',
'Magento_Theme/js/theme'
]
};

This file was deleted.

12 changes: 0 additions & 12 deletions app/design/frontend/Magento/blank/Magento_Theme/web/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,9 @@ define([
], 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();
});
20 changes: 6 additions & 14 deletions lib/web/mage/ie-class-fixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@
* See COPYING.txt for license details.
*/

/* eslint-disable strict */
(function () {
var userAgent = navigator.userAgent, // user agent identifier
html = document.documentElement, // html tag
gap = ''; // gap between classes
define([], function () {
'use strict';

if (html.className) { // check if neighbour class exist in html tag
gap = ' ';
} // end if

if (userAgent.match(/Trident.*rv[ :]*11\./)) { // Special case for IE11
html.className += gap + 'ie11';
} // end if

})();
if (navigator.userAgent.match(/Trident.*rv[ :]*11\./)) {
document.documentElement.classList.add('ie11');
}
});