Skip to content

Commit 03eb24c

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'tango/MAGETWO-51023' into MAGETWO-51859
2 parents 660f1cf + ae6c574 commit 03eb24c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/ConfigurablePanel.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,10 @@ protected function getRows()
443443
'elementTmpl' => 'Magento_ConfigurableProduct/components/file-uploader',
444444
'fileInputName' => 'image',
445445
'isMultipleFiles' => false,
446-
'imports' => [
446+
'links' => [
447447
'thumbnailUrl' => '${$.provider}:${$.parentScope}.thumbnail_image',
448-
'thumbnail' => '${$.provider}:${$.parentScope}.thumbnail'
448+
'thumbnail' => '${$.provider}:${$.parentScope}.thumbnail',
449+
'smallImage' => '${$.provider}:${$.parentScope}.small_image',
449450
],
450451
'uploaderConfig' => [
451452
'url' => $this->urlBuilder->addSessionParam()->getUrl(

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/components/file-uploader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ define([
1313
actionsListOpened: false,
1414
thumbnailUrl: '',
1515
thumbnail: null,
16+
smallImage: null,
1617
defaults: {
1718
fileInputName: ''
1819
},
@@ -23,7 +24,7 @@ define([
2324
* @returns {Object} Chainable.
2425
*/
2526
initObservable: function () {
26-
this._super().observe(['processedFile', 'actionsListOpened', 'thumbnailUrl', 'thumbnail']);
27+
this._super().observe(['processedFile', 'actionsListOpened', 'thumbnailUrl', 'thumbnail', 'smallImage']);
2728

2829
return this;
2930
},
@@ -89,6 +90,9 @@ define([
8990
deleteImage: function () {
9091
this.processedFile({});
9192
this.value(null);
93+
this.thumbnail(null);
94+
this.thumbnailUrl(null);
95+
this.smallImage(null);
9296

9397
return this;
9498
}

0 commit comments

Comments
 (0)