Skip to content
Snippets Groups Projects
Commit 8221fc9d authored by Posyniak, Oleh(oposyniak)'s avatar Posyniak, Oleh(oposyniak)
Browse files

Merge pull request #511 from magento-tango/MAGETWO-51470

[Tango] Bug fixes
parents 73fb299b 355751e7
No related merge requests found
......@@ -458,7 +458,8 @@ class BundlePanel extends AbstractModifier
'component' => 'Magento_Bundle/js/components/bundle-input-type',
'parentContainer' => 'product_bundle_container',
'selections' => 'bundle_selections',
'targetIndex' => 'is_default',
'isDefaultIndex' => 'is_default',
'userDefinedIndex' => 'selection_can_change_qty',
'dataScope' => 'type',
'label' => __('Input Type'),
'sortOrder' => 20,
......
......@@ -26,36 +26,42 @@ define([
if (type !== this.previousType) {
this.previousType = type;
if (type === 'radio') {
this.clearValues();
}
this.processSelections(type === 'radio');
}
this._super();
},
/**
* Clears values in components like this.
* Toggle 'User Defined' column and clears values
* @param {Boolean} isRadio
*/
clearValues: function () {
processSelections: function (isRadio) {
var records = registry.get(this.retrieveParentName(this.parentContainer) + '.' + this.selections),
checkedFound = false;
records.elems.each(function (record) {
record.elems.filter(function (comp) {
return comp.index === this.targetIndex;
return comp.index === this.userDefinedIndex;
}, this).each(function (comp) {
if (comp.checked()) {
if (checkedFound) {
comp.clearing = true;
comp.clear();
comp.clearing = false;
}
checkedFound = true;
}
comp.visible(isRadio);
});
if (isRadio) {
record.elems.filter(function (comp) {
return comp.index === this.isDefaultIndex;
}, this).each(function (comp) {
if (comp.checked()) {
if (checkedFound) {
comp.clearing = true;
comp.clear();
comp.clearing = false;
}
checkedFound = true;
}
});
}
}, this);
},
......
......@@ -257,6 +257,12 @@ class UpgradeData implements UpgradeDataInterface
'frontend_label',
'Small'
);
$categorySetup->updateAttribute(
ProductAttributeInterface::ENTITY_TYPE_CODE,
'image',
'frontend_input_renderer',
null
);
//Design tab
$categorySetup->updateAttribute(
......
......@@ -319,8 +319,7 @@ class CustomOptions extends AbstractModifier
'sortOrder' => 20,
'actions' => [
[
'targetName' => static::FORM_NAME . '.' . static::FORM_NAME . '.'
. static::GROUP_CUSTOM_OPTIONS_NAME . '.' . static::GRID_OPTIONS_NAME,
'targetName' => 'ns = ${ $.ns }, index = ' . static::GRID_OPTIONS_NAME,
'actionName' => 'addChild',
]
]
......
......@@ -6,7 +6,6 @@
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles"/>
<body>
<referenceContainer name="content">
<uiComponent name="cms_page_form"/>
......
......@@ -509,8 +509,8 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
->addAttributeToSelect('name')
->addAttributeToSelect('price')
->addAttributeToSelect('weight')
// ->addAttributeToSelect('msrp')
// ->addAttributeToSelect('media_gallery')
->addAttributeToSelect('image')
->addAttributeToSelect('status')
->addFilterByRequiredOptions()
->setStoreId($product->getStoreId());
......
......@@ -22,7 +22,7 @@ define([
* Change visibility for samplesFieldset & linksFieldset based on current statuses of checkbox.
*/
changeVisibility: function () {
if (this.samplesFieldset && this.linksFieldset) {
if (this.samplesFieldset() && this.linksFieldset()) {
if (this.checked() && !this.disabled()) {
this.samplesFieldset().visible(true);
this.linksFieldset().visible(true);
......
......@@ -64,7 +64,7 @@
"component": "Magento_Ui/js/lib/step-wizard",
"initData": <?= /* @escapeNotVerified */ $this->helper("Magento\Framework\Json\Helper\Data")->jsonEncode($block->getInitData()) ?>,
"stepsNames": <?= /* @escapeNotVerified */ $this->helper("Magento\Framework\Json\Helper\Data")->jsonEncode($block->getStepComponents()) ?>,
"modalClass": "<?= /* @noEscape */ $block->getData('config/modal')?>"
"modalClass": "<?= /* @noEscape */ $block->getData('config/dataScope')?>"
}
}
}
......
......@@ -309,7 +309,7 @@ class Widget
} elseif (trim($value) == '') {
$widget = $this->getConfigAsObject($type);
$parameters = $widget->getParameters();
if (is_object($parameters[$name])) {
if (isset($parameters[$name]) && is_object($parameters[$name])) {
$value = $parameters[$name]->getValue();
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment