Skip to content

Commit 068a97e

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #14270: Remove usage of $.browser as it's unused and deprecated in jQuery. Fixes #14267 (by @jonathanKingston) - #14157: [Foward-Port of #14156] Add website- and storeview-code in stores admin grid (by @aschrammel) - #14218: Removing unused legacy price code (by @jonathanKingston) - #14173: 2.3 devel 14172 set timeout (by @jonathanKingston) Fixed GitHub Issues: - #14267: Use of deprecated $.browser (reported by @jonathanKingston) has been fixed in #14270 by @jonathanKingston in 2.3-develop branch Related commits: 1. 6c46def - #14172: Remove use of setTimeout eval (reported by @jonathanKingston) has been fixed in #14173 by @jonathanKingston in 2.3-develop branch Related commits: 1. e501f67 2. 0684b13
2 parents 8088a14 + 4745967 commit 068a97e

File tree

19 files changed

+19
-44
lines changed

19 files changed

+19
-44
lines changed

app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function render(\Magento\Framework\DataObject $row)
2727
$this->getUrl('adminhtml/*/editGroup', ['group_id' => $row->getGroupId()]) .
2828
'">' .
2929
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
30-
'</a>';
30+
'</a><br />'
31+
. '(' . __('Code') . ': ' . $row->getGroupCode() . ')';
3132
}
3233
}

app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function render(\Magento\Framework\DataObject $row)
2727
$this->getUrl('adminhtml/*/editStore', ['store_id' => $row->getStoreId()]) .
2828
'">' .
2929
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
30-
'</a>';
30+
'</a><br />' .
31+
'(' . __('Code') . ': ' . $row->getStoreCode() . ')';
3132
}
3233
}

app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function render(\Magento\Framework\DataObject $row)
2424
$this->getUrl('adminhtml/*/editWebsite', ['website_id' => $row->getWebsiteId()]) .
2525
'">' .
2626
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
27-
'</a>';
27+
'</a><br />' .
28+
'(' . __('Code') . ': ' . $row->getCode() . ')';
2829
}
2930
}

app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ define([
144144
*/
145145
navigateTo: function (code, scrollToElementId) {
146146
var sortedItems = steps().sort(this.sortItems),
147-
bodyElem = $.browser.safari || $.browser.chrome ? $('body') : $('html');
147+
bodyElem = $('body');
148148

149149
scrollToElementId = scrollToElementId || null;
150150

app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ define([
88
'underscore',
99
'ko',
1010
'uiComponent',
11-
'Magento_Checkout/js/model/step-navigator',
12-
'jquery/jquery.hashchange'
11+
'Magento_Checkout/js/model/step-navigator'
1312
], function ($, _, ko, Component, stepNavigator) {
1413
'use strict';
1514

@@ -25,7 +24,7 @@ define([
2524
/** @inheritdoc */
2625
initialize: function () {
2726
this._super();
28-
$(window).hashchange(_.bind(stepNavigator.handleHash, stepNavigator));
27+
window.addEventListener('hashchange', _.bind(stepNavigator.handleHash, stepNavigator));
2928
stepNavigator.handleHash();
3029
},
3130

app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
require([
3333
"jquery",
3434
"uiRegistry",
35-
"jquery/jquery.hashchange",
3635
"mage/mage",
3736
"prototype",
3837
"mage/adminhtml/form",
@@ -379,7 +378,7 @@ require([
379378
return false;
380379
};
381380

382-
jQuery(window).hashchange(handleHash);
381+
window.addEventListener('hashchange', handleHash);
383382
handleHash();
384383

385384
registry.set('adminSystemConfig', adminSystemConfig);

app/code/Magento/Integration/Controller/Adminhtml/Integration/LoginSuccessCallback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ class LoginSuccessCallback extends \Magento\Integration\Controller\Adminhtml\Int
1515
*/
1616
public function execute()
1717
{
18-
$this->getResponse()->setBody('<script>setTimeout("self.close()",1000);</script>');
18+
$this->getResponse()->setBody('<script>setTimeout(self.close.bind(this), 1000);</script>');
1919
}
2020
}

app/code/Magento/Store/Model/ResourceModel/Website/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ public function joinGroupAndStore()
138138
$this->getSelect()->joinLeft(
139139
['group_table' => $this->getTable('store_group')],
140140
'main_table.website_id = group_table.website_id',
141-
['group_id' => 'group_id', 'group_title' => 'name']
141+
['group_id' => 'group_id', 'group_title' => 'name', 'group_code' => 'code']
142142
)->joinLeft(
143143
['store_table' => $this->getTable('store')],
144144
'group_table.group_id = store_table.group_id',
145-
['store_id' => 'store_id', 'store_title' => 'name']
145+
['store_id' => 'store_id', 'store_title' => 'name', 'store_code' => 'code']
146146
);
147147
$this->addOrder('group_table.name', \Magento\Framework\DB\Select::SQL_ASC) // store name
148148
->addOrder(

app/code/Magento/Theme/view/base/requirejs-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ var config = {
1515
},
1616
'shim': {
1717
'jquery/jquery-migrate': ['jquery'],
18-
'jquery/jquery.hashchange': ['jquery', 'jquery/jquery-migrate'],
1918
'jquery/jstree/jquery.hotkeys': ['jquery'],
2019
'jquery/hover-intent': ['jquery'],
2120
'mage/adminhtml/backup': ['prototype'],
@@ -39,7 +38,6 @@ var config = {
3938
'jquery/validate': 'jquery/jquery.validate',
4039
'jquery/hover-intent': 'jquery/jquery.hoverIntent',
4140
'jquery/file-uploader': 'jquery/fileUploader/jquery.fileupload-fp',
42-
'jquery/jquery.hashchange': 'jquery/jquery.ba-hashchange.min',
4341
'prototype': 'legacy-build.min',
4442
'jquery/jquery-storageapi': 'jquery/jquery.storageapi.min',
4543
'text': 'mage/requirejs/text',

app/code/Magento/Ui/view/base/web/js/lib/view/utils/raf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ define([
1919
window.onRequestAnimationFrame ||
2020
window.msRequestAnimationFrame ||
2121
function (callback) {
22+
if (typeof callback != 'function') {
23+
throw new Error('raf argument "callback" must be of type function');
24+
}
2225
window.setTimeout(callback, 1000 / 60);
2326
};
2427

0 commit comments

Comments
 (0)