Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.1-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #17240: [Backport] Resolved : Mobile device style groups incorrect order (by @tiagosampaio)
 - #17223: [Backport] Fix for #14593 (second try #16431) (by @gelanivishal)
 - #17211: [Backport] Fixed ability to set field config from layout xml #11302 (by @mageprince)
 - #17212: [Backport] Magento sets ISO invalid language code (by @mageprince)
 - #17213: [Backport 2.1] Fix "pattern" UI Component validation (by @mageprince)


Fixed GitHub Issues:
 - #14476: Mobile device style groups incorrect order in _responsive.less (reported by @damiandawber) has been fixed in #17240 by @tiagosampaio in 2.1-develop branch
   Related commits:
     1. b957e32

 - #14593: Press Esc Key on modal generate a jquery UI error (reported by @apomili) has been fixed in #17223 by @gelanivishal in 2.1-develop branch
   Related commits:
     1. b50caeb
     2. 540cdb5
     3. d937ca7

 - #11540: Magento sets iso invalid language code in html header (reported by @SirElectro) has been fixed in #17212 by @mageprince in 2.1-develop branch
   Related commits:
     1. 6702cdc

 - #9919: Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern (reported by @bap14) has been fixed in #17213 by @mageprince in 2.1-develop branch
   Related commits:
     1. 64bad6b
     2. 50f4051
  • Loading branch information
Stanislav Idolov authored Aug 1, 2018
2 parents 0b60302 + 02963cc commit 83044ca
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
27 changes: 13 additions & 14 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,19 @@ protected function getFieldConfig(

$element = [
'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent,
'config' => [
// customScope is used to group elements within a single form (e.g. they can be validated separately)
'customScope' => $dataScopePrefix,
'customEntry' => isset($additionalConfig['config']['customEntry'])
? $additionalConfig['config']['customEntry']
: null,
'template' => 'ui/form/field',
'elementTmpl' => isset($additionalConfig['config']['elementTmpl'])
? $additionalConfig['config']['elementTmpl']
: $elementTemplate,
'tooltip' => isset($additionalConfig['config']['tooltip'])
? $additionalConfig['config']['tooltip']
: null
],
'config' => $this->mergeConfigurationNode(
'config',
$additionalConfig,
[
'config' => [
// customScope is used to group elements within a single
// form (e.g. they can be validated separately)
'customScope' => $dataScopePrefix,
'template' => 'ui/form/field',
'elementTmpl' => $elementTemplate,
],
]
),
'dataScope' => $dataScopePrefix . '.' . $attributeCode,
'label' => $attributeConfig['label'],
'provider' => $providerName,
Expand Down
6 changes: 4 additions & 2 deletions app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ define([
confirm: function () {
self._removeItem($(event.currentTarget));
},
always: function (event) {
event.stopImmediatePropagation();

/** @inheritdoc */
always: function (e) {
e.stopImmediatePropagation();
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ define([
],
"pattern": [
function(value, param) {
return param.test(value);
return new RegExp(param).test(value);
},
$.mage.__('Invalid format.')
],
Expand Down
5 changes: 3 additions & 2 deletions app/code/Magento/Ui/view/base/web/js/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ define([
/**
* Escape key press handler,
* close modal window
* @param {Object} event - event
*/
escapeKey: function () {
escapeKey: function (event) {
if (this.options.isOpen && this.modal.find(document.activeElement).length ||
this.options.isOpen && this.modal[0] === document.activeElement) {
this.closeModal();
this.closeModal(event);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/View/Page/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function __construct(
$this->setElementAttribute(
self::ELEMENT_TYPE_HTML,
self::HTML_ATTRIBUTE_LANG,
str_replace('_', '-', $this->localeResolver->getLocale())
strstr($this->localeResolver->getLocale(), '_', true)
);
}

Expand Down
16 changes: 8 additions & 8 deletions lib/web/css/source/lib/_responsive.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@

& when (@media-target = 'mobile'), (@media-target = 'all') {

@media only screen and (max-width: (@screen__xxs - 1)) {
.media-width('max', @screen__xxs);
@media only screen and (max-width: @screen__m) {
.media-width('max', (@screen__m + 1));
}

@media only screen and (max-width: (@screen__xs - 1)) {
.media-width('max', @screen__xs);
@media only screen and (max-width: (@screen__m - 1)) {
.media-width('max', @screen__m);
}

@media only screen and (max-width: (@screen__s - 1)) {
.media-width('max', @screen__s);
}

@media only screen and (max-width: (@screen__m - 1)) {
.media-width('max', @screen__m);
@media only screen and (max-width: (@screen__xs - 1)) {
.media-width('max', @screen__xs);
}

@media only screen and (max-width: @screen__m) {
.media-width('max', (@screen__m + 1));
@media only screen and (max-width: (@screen__xxs - 1)) {
.media-width('max', @screen__xxs);
}

@media all and (min-width: @screen__s) {
Expand Down

0 comments on commit 83044ca

Please sign in to comment.