Skip to content

Commit 1e19c93

Browse files
author
Oleksii Korshenko
authored
[EngCom] Public Pull Requests
Public Pull Requests: #10062 #10060 #10031 #9681 #7139
2 parents 68a79d9 + 18bd470 commit 1e19c93

File tree

5 files changed

+74
-13
lines changed

5 files changed

+74
-13
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/summary.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@ define([
9191
var productSku = this.variationsComponent().getProductValue('sku'),
9292
productPrice = this.variationsComponent().getProductPrice(),
9393
productWeight = this.variationsComponent().getProductValue('weight'),
94+
productName = this.variationsComponent().getProductValue('name'),
9495
variationsKeys = [],
9596
gridExisting = [],
9697
gridNew = [],
9798
gridDeleted = [];
9899

99100
this.variations = [];
100101
_.each(variations, function (options) {
101-
var product, images, sku, quantity, price, variation,
102+
var product, images, sku, name, quantity, price, variation,
102103
productId = this.variationsComponent().getProductIdByOptions(options);
103104

104105
if (productId) {
@@ -110,6 +111,9 @@ define([
110111
sku = productSku + _.reduce(options, function (memo, option) {
111112
return memo + '-' + option.label;
112113
}, '');
114+
name = productName + _.reduce(options, function (memo, option) {
115+
return memo + '-' + option.label;
116+
}, '');
113117
quantity = getSectionValue('quantity', options);
114118

115119
if (!quantity && productId) {
@@ -128,7 +132,7 @@ define([
128132
options: options,
129133
images: images,
130134
sku: sku,
131-
name: sku,
135+
name: name,
132136
quantity: quantity,
133137
price: price,
134138
productId: productId,

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
?>
1212
<div class="block newsletter">
13-
<div class="title"><strong><?php /* @escapeNotVerified */ echo __('Newsletter') ?></strong></div>
13+
<div class="title"><strong><?php echo $block->escapeHtml(__('Newsletter')) ?></strong></div>
1414
<div class="content">
1515
<form class="form subscribe"
1616
novalidate

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/optgroup.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,16 @@ define([
297297
ko.utils.arrayForEach(options, function (option) {
298298
var value = applyToObject(option, optionsValue, option),
299299
label = applyToObject(option, optionsText, value) || '',
300+
disabled = applyToObject(option, 'disabled', false) || false,
300301
obj = {},
301302
space = '\u2007\u2007\u2007';
302303

303304
obj[optionTitle] = applyToObject(option, optionsText + 'title', value);
304305

306+
if (disabled) {
307+
obj.disabled = disabled;
308+
}
309+
305310
label = label.replace(nbspRe, '').trim();
306311

307312
if (Array.isArray(value)) {

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Usps\Model;
108

119
use Magento\Framework\App\ObjectManager;
@@ -413,7 +411,6 @@ protected function _getXmlQuotes()
413411

414412
if ($this->_isUSCountry($r->getDestCountryId())) {
415413
$xml = $this->_xmlElFactory->create(
416-
417414
['data' => '<?xml version="1.0" encoding="UTF-8"?><RateV4Request/>']
418415
);
419416
$xml->addAttribute('USERID', $r->getUserId());
@@ -461,7 +458,6 @@ protected function _getXmlQuotes()
461458
$api = 'RateV4';
462459
} else {
463460
$xml = $this->_xmlElFactory->create(
464-
465461
['data' => '<?xml version = "1.0" encoding = "UTF-8"?><IntlRateV2Request/>']
466462
);
467463
$xml->addAttribute('USERID', $r->getUserId());
@@ -1946,7 +1942,7 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
19461942
*/
19471943
public function getContainerTypes(\Magento\Framework\DataObject $params = null)
19481944
{
1949-
if (is_null($params)) {
1945+
if ($params === null) {
19501946
return $this->_getAllowedContainers();
19511947
}
19521948

@@ -2068,7 +2064,7 @@ protected function _parseZip($zipString, $returnFull = false)
20682064
private function isServiceAvailable(\SimpleXMLElement $service)
20692065
{
20702066
// Allow services which which don't provide any ExtraServices
2071-
if(empty($service->ExtraServices->children()->count())) {
2067+
if (empty($service->ExtraServices->children()->count())) {
20722068
return true;
20732069
}
20742070

lib/web/mage/sticky.js

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,48 @@ define([
1111

1212
$.widget('mage.sticky', {
1313
options: {
14-
container: ''
14+
/**
15+
* Element selector, who's height will be used to restrict the
16+
* maximum offsetTop position of the stuck element.
17+
* Default uses document body.
18+
* @type {String}
19+
*/
20+
container: '',
21+
22+
/**
23+
* Spacing in pixels above the stuck element
24+
* @type {Number|Function} Number or Function that will return a Number
25+
*/
26+
spacingTop: 0,
27+
28+
/**
29+
* Allows postponing sticking, until element will go out of the
30+
* screen for the number of pixels.
31+
* @type {Number|Function} Number or Function that will return a Number
32+
*/
33+
stickAfter: 0,
34+
35+
/**
36+
* CSS class for active sticky state
37+
* @type {String}
38+
*/
39+
stickyClass: '_sticky'
40+
},
41+
42+
/**
43+
* Retrieve option value
44+
* @param {String} option
45+
* @return {*}
46+
* @private
47+
*/
48+
_getOptionValue: function (option) {
49+
var value = this.options[option] || 0;
50+
51+
if (typeof value === 'function') {
52+
value = this.options[option]();
53+
}
54+
55+
return value;
1556
},
1657

1758
/**
@@ -35,14 +76,29 @@ define([
3576
*/
3677
_stick: function () {
3778
var offset,
38-
isStatic;
79+
isStatic,
80+
stuck,
81+
stickAfter;
3982

4083
isStatic = this.element.css('position') === 'static';
4184

4285
if (!isStatic && this.element.is(':visible')) {
43-
offset = $(document).scrollTop() - this.parentOffset;
86+
offset = $(document).scrollTop() -
87+
this.parentOffset +
88+
this._getOptionValue('spacingTop');
89+
4490
offset = Math.max(0, Math.min(offset, this.maxOffset));
45-
this.element.css('top', offset);
91+
92+
stuck = this.element.hasClass(this.options.stickyClass);
93+
stickAfter = this._getOptionValue('stickAfter');
94+
95+
if (offset && !stuck && offset < stickAfter) {
96+
offset = 0;
97+
}
98+
99+
this.element
100+
.toggleClass(this.options.stickyClass, offset > 0)
101+
.css('top', offset);
46102
}
47103
},
48104

0 commit comments

Comments
 (0)