Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
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
  • Loading branch information
magento-engcom-team authored Apr 17, 2019
2 parents e9fb114 + c01e038 commit 77de966
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
*
* @return string
*/
public function getValuesHtml(): string
public function getValuesHtml()
{
$option = $this->getOption();
$optionType = $option->getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ define([
params :
[params];

if (typeof message === 'function') {
message = message.call(rule);
}

message = params.reduce(function (msg, param, idx) {
return msg.replace(new RegExp('\\{' + idx + '\\}', 'g'), param);
}, message);
Expand Down
26 changes: 19 additions & 7 deletions lib/web/css/source/lib/_icons.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@
@_icon-font-text-hide: @icon-font__text-hide,
@_icon-font-display: @icon-font__display
) when (@_icon-font-position = before) {
._lib-icon-text-hide(@_icon-font-text-hide);
.lib-css(display, @_icon-font-display);
text-decoration: none;
text-decoration: none;

& when not (@_icon-font-content = false) {
._lib-icon-text-hide(@_icon-font-text-hide);
}

&:before {
._lib-icon-font(
Expand Down Expand Up @@ -68,10 +71,13 @@
@_icon-font-text-hide: @icon-font__text-hide,
@_icon-font-display: @icon-font__display
) when (@_icon-font-position = after) {
._lib-icon-text-hide(@_icon-font-text-hide);
.lib-css(display, @_icon-font-display);
text-decoration: none;


& when not (@_icon-font-content = false) {
._lib-icon-text-hide(@_icon-font-text-hide);
}

&:after {
._lib-icon-font(
@_icon-font-content,
Expand Down Expand Up @@ -151,8 +157,11 @@
@_icon-image-text-hide: @icon__text-hide
) when (@_icon-image-position = before) {
display: inline-block;
._lib-icon-text-hide(@_icon-image-text-hide);


& when not (@_icon-image = false) {
._lib-icon-text-hide(@_icon-image-text-hide);
}

&:before {
._lib-icon-image(
@_icon-image,
Expand All @@ -179,7 +188,10 @@
@_icon-image-text-hide: @icon__text-hide
) when (@_icon-image-position = after) {
display: inline-block;
._lib-icon-text-hide(@_icon-image-text-hide);

& when not (@_icon-image = false) {
._lib-icon-text-hide(@_icon-font-text-hide);
}

&:after {
._lib-icon-image(
Expand Down
12 changes: 10 additions & 2 deletions lib/web/fotorama/fotorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -1455,16 +1455,24 @@ fotoramaVersion = '4.6.4';
}
} else {
stopEvent(e);
(options.onMove || noop).call(el, e, {touch: touchFLAG});
if (movedEnough(xDiff,yDiff)) {
(options.onMove || noop).call(el, e, {touch: touchFLAG});
}
}

if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) {
if (!moved && movedEnough(xDiff, yDiff) && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance)
{
moved = true;
}

tail.checked = tail.checked || xWin || yWin;
}


function movedEnough(xDiff, yDiff) {
return xDiff > yDiff && xDiff > 1.5;
}

function onEnd(e) {
(options.onTouchEnd || noop)();

Expand Down
5 changes: 1 addition & 4 deletions lib/web/fotorama/fotorama.min.js

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,18 @@ define([
* @param {Object} o
*/
openFileBrowser: function (o) {
var typeTitle,
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0,
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'),
wUrl = this.config['files_browser_window_url'] +
var targetElementID = tinyMCE.activeEditor.getElement().getAttribute('id'),
originId = this.id,
typeTitle,
storeId,
frameDialog,
wUrl;

this.initialize(targetElementID, this.config);

storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0;
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]');
wUrl = this.config['files_browser_window_url'] +
'target_element_id/' + this.id + '/' +
'store/' + storeId + '/';

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

this.initialize(originId, this.config);

frameDialog.hide();
jQuery('#mceModalBlocker').hide();

Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/gallery/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ define([
this.setupBreakpoints();
this.initFullscreenSettings();

this.settings.$element.on('mousedown', '.fotorama__stage__frame', function () {
this.settings.$element.on('click', '.fotorama__stage__frame', function () {
if (
!$(this).parents('.fotorama__shadows--left, .fotorama__shadows--right').length &&
!$(this).hasClass('fotorama-video-container')
Expand Down
7 changes: 6 additions & 1 deletion nginx.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ location /media/downloadable/ {
location /media/import/ {
deny all;
}
location /errors/ {
location ~* \.xml$ {
deny all;
}
}

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

# Banned locations (only reached if the earlier PHP entry point regexes don't match)
location ~* (\.php$|\.htaccess$|\.git) {
location ~* (\.php$|\.phtml$|\.htaccess$|\.git) {
deny all;
}
3 changes: 3 additions & 0 deletions pub/errors/.htaccess
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Options None
<FilesMatch "\.(xml|phtml)$">
Deny from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>

0 comments on commit 77de966

Please sign in to comment.