Skip to content

Commit c4d4643

Browse files
author
Dmitry Kologrivov
committed
Merge branch 'FIX-PR-CS-MD' into 'master3'
MAGETWO: Fix csmd for fixes of PR See merge request !154
2 parents 99696c1 + edba324 commit c4d4643

File tree

11 files changed

+612
-612
lines changed

11 files changed

+612
-612
lines changed

app/code/Magento/Catalog/view/adminhtml/web/catalog/base-image-uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ define([
3838

3939
var findElement = function (data) {
4040
return $container.find('.image:not(.image-placeholder)').filter(function () {
41-
if(!$(this).data('image')) {
41+
if (!$(this).data('image')) {
4242
return false;
4343
}
4444
return $(this).data('image').file === data.file;

app/code/Magento/Catalog/view/adminhtml/web/catalog/category/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ define([
2020

2121
var params = {};
2222
var fields = $('category_edit_form').getElementsBySelector('input', 'select');
23-
for(var i=0;i<fields.length;i++){
23+
for (var i=0; i<fields.length; i++) {
2424
if (!fields[i].name) {
2525
continue;
2626
}

app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,9 @@ define([
703703
mageData.scripts.map(function(script) {
704704
return eval(script);
705705
});
706-
} catch (e) {}
706+
} catch (e) {
707+
708+
}
707709
this.restorePhase = false;
708710
}
709711
break;

app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ define([
301301
* @private
302302
*/
303303
_onOpenDialog: function(e, imageData) {
304-
if(imageData.media_type && imageData.media_type != 'image') {
304+
if (imageData.media_type && imageData.media_type != 'image') {
305305
return;
306306
}
307307
this._showDialog(imageData);
@@ -315,7 +315,7 @@ define([
315315
_showDialog: function (imageData) {
316316
var $imageContainer = this.findElement(imageData);
317317
var dialogElement = $imageContainer.data('dialog');
318-
if(!this.dialogTmpl) {
318+
if (!this.dialogTmpl) {
319319
alert('System problem!');
320320
return;
321321
}

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ define([
4646

4747
submitForm: function(form) {
4848
var self = this;
49-
if (form.has('input[type="file"]').length && form.find('input[type="file"]').val() !== '') {
49+
if (form.has('input[type="file"]').length && form.find('input[type="file"]').val() !== '') {
5050
self.element.off('submit');
5151
form.submit();
5252
} else {

app/code/Magento/ProductVideo/Block/Adminhtml/Product/Edit/NewVideo.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ class NewVideo extends \Magento\Backend\Block\Widget\Form\Generic
3434

3535
/**
3636
* @param \Magento\Backend\Block\Template\Context $context
37-
* @param \Magento\ProductVideo\Helper\Media $mediaHelper
38-
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
3937
* @param \Magento\Framework\Registry $registry
4038
* @param \Magento\Framework\Data\FormFactory $formFactory
39+
* @param \Magento\ProductVideo\Helper\Media $mediaHelper
40+
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
4141
* @param array $data
4242
*/
4343
public function __construct(
4444
\Magento\Backend\Block\Template\Context $context,
45-
\Magento\ProductVideo\Helper\Media $mediaHelper,
46-
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
4745
\Magento\Framework\Registry $registry,
4846
\Magento\Framework\Data\FormFactory $formFactory,
47+
\Magento\ProductVideo\Helper\Media $mediaHelper,
48+
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
4949
array $data = []
5050
) {
5151
parent::__construct($context, $registry, $formFactory, $data);
@@ -269,11 +269,10 @@ protected function addMediaRoleAttributes(Fieldset $fieldset)
269269
protected function getNoteVideoUrl()
270270
{
271271
$result = __('YouTube and Vimeo supported.');
272-
if (is_null($this->mediaHelper->getYouTubeApiKey())) {
272+
if ($this->mediaHelper->getYouTubeApiKey() === null) {
273273
$result = __(
274274
'Vimeo supported.<br />'
275-
. 'To add YouTube video, please <a href="%1">enter YouTube API Key</a> first.'
276-
,
275+
. 'To add YouTube video, please <a href="%1">enter YouTube API Key</a> first.',
277276
$this->getConfigApiKeyUrl()
278277
);
279278
}

app/code/Magento/ProductVideo/Model/Plugin/ExternalVideoEntryProcessor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class ExternalVideoEntryProcessor
4848

4949
/**
5050
* @param \Magento\Catalog\Model\ResourceModel\Product\Attribute\Backend\Media $resourceEntryMediaGallery
51+
* @param \Magento\ProductVideo\Model\ResourceModel\Video $videoResourceModel
5152
*/
5253
public function __construct(
5354
\Magento\Catalog\Model\ResourceModel\Product\Attribute\Backend\Media $resourceEntryMediaGallery,

app/code/Magento/ProductVideo/Model/Plugin/ExternalVideoResourceBackend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(\Magento\ProductVideo\Model\ResourceModel\Video $vid
3636
public function afterDuplicate(Media $originalResourceModel, array $valueIdMap)
3737
{
3838
$mediaGalleryEntitiesData = $this->videoResourceModel->loadByIds(array_keys($valueIdMap));
39-
foreach($mediaGalleryEntitiesData as $row) {
39+
foreach ($mediaGalleryEntitiesData as $row) {
4040
$row['value_id'] = $valueIdMap[$row['value_id']];
4141
$this->videoResourceModel->insertOnDuplicate($row);
4242
}

0 commit comments

Comments
 (0)