Skip to content

Commit 77de966

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #22250: [Backport] Fix gallery event observer (by @Den4ik) - #22267: magento2-22238: removed backward incompatible change from the options� (by @VitaliyBoyko) - #22174: WYSIWYG Image-Popup is not working correctly with multipleEditors (by @Nazar65) - #20107: [2.2] Add support for validation message callback (by @floorz) - #21946: [Backport] Secure errors directory (by @amol2jcommerce) - #22078: [backport] issue - 21507 Change photo only if user swipe horizontally (by @Nazar65) - #21203: [Backport] icon text showing feature (by @mage2pratik) Fixed GitHub Issues: - #21789: [BUG] Product gallery opening by mistake (reported by @Den4ik) has been fixed in #22250 by @Den4ik in 2.2-develop branch Related commits: 1. 66bacdb - #22238: Backward-incompatible change between 2.2.7 and 2.2.8 (reported by @yutv) has been fixed in #22267 by @VitaliyBoyko in 2.2-develop branch Related commits: 1. 179bedf - #18548: WYSIWYG-Editor Insert Image-Popup is not working correctly with multiple WYSIWYG-Editors on page (reported by @4ctobias) has been fixed in #22174 by @Nazar65 in 2.2-develop branch Related commits: 1. 8611d14 2. bbe03ea 3. 84f0af8 - #20078: Magento Ui form validator message callback not supported (reported by @floorz) has been fixed in #20107 by @floorz in 2.2-develop branch Related commits: 1. 63c592a - #20209: errors/local.xml and error page templates are publicly accessible (reported by @schmengler) has been fixed in #21946 by @amol2jcommerce in 2.2-develop branch Related commits: 1. 2d291a7 - #7906: Fotorama Gallery too sensitive on Android Devices. (chrome) (reported by @joebordo) has been fixed in #22078 by @Nazar65 in 2.2-develop branch Related commits: 1. 744986b
2 parents e9fb114 + c01e038 commit 77de966

File tree

9 files changed

+59
-20
lines changed

9 files changed

+59
-20
lines changed

app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(
5959
*
6060
* @return string
6161
*/
62-
public function getValuesHtml(): string
62+
public function getValuesHtml()
6363
{
6464
$option = $this->getOption();
6565
$optionType = $option->getType();

app/code/Magento/Ui/view/base/web/js/lib/validation/validator.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ define([
4848
params :
4949
[params];
5050

51+
if (typeof message === 'function') {
52+
message = message.call(rule);
53+
}
54+
5155
message = params.reduce(function (msg, param, idx) {
5256
return msg.replace(new RegExp('\\{' + idx + '\\}', 'g'), param);
5357
}, message);

lib/web/css/source/lib/_icons.less

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
@_icon-font-text-hide: @icon-font__text-hide,
2626
@_icon-font-display: @icon-font__display
2727
) when (@_icon-font-position = before) {
28-
._lib-icon-text-hide(@_icon-font-text-hide);
2928
.lib-css(display, @_icon-font-display);
30-
text-decoration: none;
29+
text-decoration: none;
30+
31+
& when not (@_icon-font-content = false) {
32+
._lib-icon-text-hide(@_icon-font-text-hide);
33+
}
3134

3235
&:before {
3336
._lib-icon-font(
@@ -68,10 +71,13 @@
6871
@_icon-font-text-hide: @icon-font__text-hide,
6972
@_icon-font-display: @icon-font__display
7073
) when (@_icon-font-position = after) {
71-
._lib-icon-text-hide(@_icon-font-text-hide);
7274
.lib-css(display, @_icon-font-display);
7375
text-decoration: none;
74-
76+
77+
& when not (@_icon-font-content = false) {
78+
._lib-icon-text-hide(@_icon-font-text-hide);
79+
}
80+
7581
&:after {
7682
._lib-icon-font(
7783
@_icon-font-content,
@@ -151,8 +157,11 @@
151157
@_icon-image-text-hide: @icon__text-hide
152158
) when (@_icon-image-position = before) {
153159
display: inline-block;
154-
._lib-icon-text-hide(@_icon-image-text-hide);
155-
160+
161+
& when not (@_icon-image = false) {
162+
._lib-icon-text-hide(@_icon-image-text-hide);
163+
}
164+
156165
&:before {
157166
._lib-icon-image(
158167
@_icon-image,
@@ -179,7 +188,10 @@
179188
@_icon-image-text-hide: @icon__text-hide
180189
) when (@_icon-image-position = after) {
181190
display: inline-block;
182-
._lib-icon-text-hide(@_icon-image-text-hide);
191+
192+
& when not (@_icon-image = false) {
193+
._lib-icon-text-hide(@_icon-font-text-hide);
194+
}
183195

184196
&:after {
185197
._lib-icon-image(

lib/web/fotorama/fotorama.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,16 +1455,24 @@ fotoramaVersion = '4.6.4';
14551455
}
14561456
} else {
14571457
stopEvent(e);
1458-
(options.onMove || noop).call(el, e, {touch: touchFLAG});
1458+
if (movedEnough(xDiff,yDiff)) {
1459+
(options.onMove || noop).call(el, e, {touch: touchFLAG});
1460+
}
14591461
}
14601462

1461-
if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) {
1463+
if (!moved && movedEnough(xDiff, yDiff) && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance)
1464+
{
14621465
moved = true;
14631466
}
14641467

14651468
tail.checked = tail.checked || xWin || yWin;
14661469
}
14671470

1471+
1472+
function movedEnough(xDiff, yDiff) {
1473+
return xDiff > yDiff && xDiff > 1.5;
1474+
}
1475+
14681476
function onEnd(e) {
14691477
(options.onTouchEnd || noop)();
14701478

lib/web/fotorama/fotorama.min.js

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,18 @@ define([
238238
* @param {Object} o
239239
*/
240240
openFileBrowser: function (o) {
241-
var typeTitle,
242-
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0,
243-
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'),
244-
wUrl = this.config['files_browser_window_url'] +
241+
var targetElementID = tinyMCE.activeEditor.getElement().getAttribute('id'),
242+
originId = this.id,
243+
typeTitle,
244+
storeId,
245+
frameDialog,
246+
wUrl;
247+
248+
this.initialize(targetElementID, this.config);
249+
250+
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0;
251+
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]');
252+
wUrl = this.config['files_browser_window_url'] +
245253
'target_element_id/' + this.id + '/' +
246254
'store/' + storeId + '/';
247255

@@ -255,6 +263,8 @@ define([
255263
typeTitle = this.translate('Insert File...');
256264
}
257265

266+
this.initialize(originId, this.config);
267+
258268
frameDialog.hide();
259269
jQuery('#mceModalBlocker').hide();
260270

lib/web/mage/gallery/gallery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ define([
141141
this.setupBreakpoints();
142142
this.initFullscreenSettings();
143143

144-
this.settings.$element.on('mousedown', '.fotorama__stage__frame', function () {
144+
this.settings.$element.on('click', '.fotorama__stage__frame', function () {
145145
if (
146146
!$(this).parents('.fotorama__shadows--left, .fotorama__shadows--right').length &&
147147
!$(this).hasClass('fotorama-video-container')

nginx.conf.sample

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ location /media/downloadable/ {
164164
location /media/import/ {
165165
deny all;
166166
}
167+
location /errors/ {
168+
location ~* \.xml$ {
169+
deny all;
170+
}
171+
}
167172

168173
# PHP entry point for main application
169174
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
@@ -203,6 +208,6 @@ gzip_types
203208
gzip_vary on;
204209

205210
# Banned locations (only reached if the earlier PHP entry point regexes don't match)
206-
location ~* (\.php$|\.htaccess$|\.git) {
211+
location ~* (\.php$|\.phtml$|\.htaccess$|\.git) {
207212
deny all;
208213
}

pub/errors/.htaccess

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
Options None
2+
<FilesMatch "\.(xml|phtml)$">
3+
Deny from all
4+
</FilesMatch>
25
<IfModule mod_rewrite.c>
36
RewriteEngine Off
47
</IfModule>

0 commit comments

Comments
 (0)