Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko committed Jun 8, 2016
2 parents 36d6503 + e373ea7 commit 0651ebb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<div class="title"><?php /* @escapeNotVerified */ echo $block->getHeaderText() ?></div>
</div>
</div>
<div id="error-message" data-action="show-error"></div>
<div id="contents-uploader" class="contents-uploader"><?php echo $block->getChildHtml('wysiwyg_images.uploader') ?></div>
<div id="contents"></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,16 @@ require([
},
done: function (e, data) {
var progressSelector = '#' + data.fileId + ' .progressbar-container .progressbar';
var tempErrorMessage = document.createElement("div");
$(progressSelector).css('width', '100%');
$('[data-action="show-error"]').children(".message").remove();
if (data.result && !data.result.hasOwnProperty('errorcode')) {
$(progressSelector).removeClass('upload-progress').addClass('upload-success');
} else {
tempErrorMessage.className = "message message-warning warning";
tempErrorMessage.innerHTML = data.result.error;

$('[data-action="show-error"]').append(tempErrorMessage);
$(progressSelector).removeClass('upload-progress').addClass('upload-failure');
}
},
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Webapi/Controller/Soap.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
$this->_setResponseBody($responseBody);
} else if ($this->_isWsdlListRequest()) {
$servicesList = [];
foreach (array_keys($this->_wsdlGenerator->getListOfServices()) as $serviceName) {
foreach ($this->_wsdlGenerator->getListOfServices() as $serviceName) {
$servicesList[$serviceName]['wsdl_endpoint'] = $this->_soapServer->getEndpointUri()
. '?' . \Magento\Webapi\Model\Soap\Server::REQUEST_PARAM_WSDL . '&services=' . $serviceName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function minify($file)
'#(?<!:|\\\\|\'|")//(?!\s*\<\!\[)(?!\s*]]\>)[^\n\r]*#',
'',
preg_replace(
'#(?<!:)//[^\n\r]*(\s\?\>)#',
'#(?<!:|\'|")//[^\n\r]*(\s\?\>)#',
'$1',
preg_replace(
'#(?<!:)//[^\n\r]*(\<\?php)[^\n\r]*(\s\?\>)[^\n\r]*#',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public function testMinify()
<head>
<title>Test title</title>
</head>
<link rel="stylesheet" href='https://www.example.com/2' type="text/css" />
<link rel="stylesheet" type="text/css" media="all" href="https://www.example.com/1" type="text/css" />
<body>
<a href="http://somelink.com/text.html">Text Link</a>
<img src="test.png" alt="some text" />
Expand All @@ -149,14 +151,16 @@ public function testMinify()
//]]>
</script>
<?php echo "http://some.link.com/" ?>
<?php echo "//some.link.com/" ?>
<?php echo '//some.link.com/' ?>
<em>inline text</em>
<a href="http://www.<?php echo 'hi' ?>"></a>
</body>
</html>
TEXT;

$expectedContent = <<<TEXT
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ ?> <?php ?> <html><head><title>Test title</title></head><body><a href="http://somelink.com/text.html">Text Link</a> <img src="test.png" alt="some text" /><?php echo \$block->someMethod(); ?> <div style="width: 800px" class="<?php echo \$block->getClass() ?>" /><script>
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ ?> <?php ?> <html><head><title>Test title</title></head><link rel="stylesheet" href='https://www.example.com/2' type="text/css" /><link rel="stylesheet" type="text/css" media="all" href="https://www.example.com/1" type="text/css" /><body><a href="http://somelink.com/text.html">Text Link</a> <img src="test.png" alt="some text" /><?php echo \$block->someMethod(); ?> <div style="width: 800px" class="<?php echo \$block->getClass() ?>" /><script>
var i = 1;
var j = 1;
Expand All @@ -174,7 +178,7 @@ public function testMinify()
}
});
//]]>
</script><?php echo "http://some.link.com/" ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a></body></html>
</script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a></body></html>
TEXT;

$this->appDirectoryMock->expects($this->once())
Expand Down

0 comments on commit 0651ebb

Please sign in to comment.