Skip to content

Commit 8221fc9

Browse files
Merge pull request #511 from magento-tango/MAGETWO-51470
[Tango] Bug fixes
2 parents 73fb299 + 355751e commit 8221fc9

File tree

9 files changed

+36
-25
lines changed

9 files changed

+36
-25
lines changed

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ protected function getOptionInfo()
458458
'component' => 'Magento_Bundle/js/components/bundle-input-type',
459459
'parentContainer' => 'product_bundle_container',
460460
'selections' => 'bundle_selections',
461-
'targetIndex' => 'is_default',
461+
'isDefaultIndex' => 'is_default',
462+
'userDefinedIndex' => 'selection_can_change_qty',
462463
'dataScope' => 'type',
463464
'label' => __('Input Type'),
464465
'sortOrder' => 20,

app/code/Magento/Bundle/view/adminhtml/web/js/components/bundle-input-type.js

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,42 @@ define([
2626

2727
if (type !== this.previousType) {
2828
this.previousType = type;
29-
30-
if (type === 'radio') {
31-
this.clearValues();
32-
}
29+
this.processSelections(type === 'radio');
3330
}
3431

3532
this._super();
3633
},
3734

3835
/**
39-
* Clears values in components like this.
36+
* Toggle 'User Defined' column and clears values
37+
* @param {Boolean} isRadio
4038
*/
41-
clearValues: function () {
39+
processSelections: function (isRadio) {
4240
var records = registry.get(this.retrieveParentName(this.parentContainer) + '.' + this.selections),
4341
checkedFound = false;
4442

4543
records.elems.each(function (record) {
4644
record.elems.filter(function (comp) {
47-
return comp.index === this.targetIndex;
45+
return comp.index === this.userDefinedIndex;
4846
}, this).each(function (comp) {
49-
if (comp.checked()) {
50-
if (checkedFound) {
51-
comp.clearing = true;
52-
comp.clear();
53-
comp.clearing = false;
54-
}
55-
56-
checkedFound = true;
57-
}
47+
comp.visible(isRadio);
5848
});
49+
50+
if (isRadio) {
51+
record.elems.filter(function (comp) {
52+
return comp.index === this.isDefaultIndex;
53+
}, this).each(function (comp) {
54+
if (comp.checked()) {
55+
if (checkedFound) {
56+
comp.clearing = true;
57+
comp.clear();
58+
comp.clearing = false;
59+
}
60+
61+
checkedFound = true;
62+
}
63+
});
64+
}
5965
}, this);
6066
},
6167

app/code/Magento/Catalog/Setup/UpgradeData.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
257257
'frontend_label',
258258
'Small'
259259
);
260+
$categorySetup->updateAttribute(
261+
ProductAttributeInterface::ENTITY_TYPE_CODE,
262+
'image',
263+
'frontend_input_renderer',
264+
null
265+
);
260266

261267
//Design tab
262268
$categorySetup->updateAttribute(

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ protected function getHeaderContainerConfig($sortOrder)
319319
'sortOrder' => 20,
320320
'actions' => [
321321
[
322-
'targetName' => static::FORM_NAME . '.' . static::FORM_NAME . '.'
323-
. static::GROUP_CUSTOM_OPTIONS_NAME . '.' . static::GRID_OPTIONS_NAME,
322+
'targetName' => 'ns = ${ $.ns }, index = ' . static::GRID_OPTIONS_NAME,
324323
'actionName' => 'addChild',
325324
]
326325
]

app/code/Magento/Cms/view/adminhtml/layout/cms_page_edit.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9-
<update handle="styles"/>
109
<body>
1110
<referenceContainer name="content">
1211
<uiComponent name="cms_page_form"/>

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ public function getUsedProducts($product, $requiredAttributeIds = null)
509509
->addAttributeToSelect('name')
510510
->addAttributeToSelect('price')
511511
->addAttributeToSelect('weight')
512-
// ->addAttributeToSelect('msrp')
513-
// ->addAttributeToSelect('media_gallery')
512+
->addAttributeToSelect('image')
513+
->addAttributeToSelect('status')
514514
->addFilterByRequiredOptions()
515515
->setStoreId($product->getStoreId());
516516

app/code/Magento/Downloadable/view/adminhtml/web/js/components/is-downloadable-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ define([
2222
* Change visibility for samplesFieldset & linksFieldset based on current statuses of checkbox.
2323
*/
2424
changeVisibility: function () {
25-
if (this.samplesFieldset && this.linksFieldset) {
25+
if (this.samplesFieldset() && this.linksFieldset()) {
2626
if (this.checked() && !this.disabled()) {
2727
this.samplesFieldset().visible(true);
2828
this.linksFieldset().visible(true);

app/code/Magento/Ui/view/base/templates/stepswizard.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"component": "Magento_Ui/js/lib/step-wizard",
6565
"initData": <?= /* @escapeNotVerified */ $this->helper("Magento\Framework\Json\Helper\Data")->jsonEncode($block->getInitData()) ?>,
6666
"stepsNames": <?= /* @escapeNotVerified */ $this->helper("Magento\Framework\Json\Helper\Data")->jsonEncode($block->getStepComponents()) ?>,
67-
"modalClass": "<?= /* @noEscape */ $block->getData('config/modal')?>"
67+
"modalClass": "<?= /* @noEscape */ $block->getData('config/dataScope')?>"
6868
}
6969
}
7070
}

app/code/Magento/Widget/Model/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function getWidgetDeclaration($type, $params = [], $asIs = true)
309309
} elseif (trim($value) == '') {
310310
$widget = $this->getConfigAsObject($type);
311311
$parameters = $widget->getParameters();
312-
if (is_object($parameters[$name])) {
312+
if (isset($parameters[$name]) && is_object($parameters[$name])) {
313313
$value = $parameters[$name]->getValue();
314314
}
315315
}

0 commit comments

Comments
 (0)