Skip to content

Commit 44e607c

Browse files
author
Melnikov, Igor(imelnikov)
committed
Merge pull request #188 from magento-goinc/MAGETWO-45563
[GoInc] BugFix
2 parents a4d063a + 2321520 commit 44e607c

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ define([
135135
*/
136136
close: function (rowIndex) {
137137
try {
138-
if (this.productsMassAction().selected.length) {
138+
if (this.productsMassAction().selected.getLength()) {
139139
this.variationsComponent()[this.callbackName](this.productsMassAction()
140140
.selected.map(this.getProductById.bind(this)));
141141
this.productsMassAction().deselectAll();

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,24 @@ define([
4848
},
4949
showGrid: function (rowIndex) {
5050
var product = this.productMatrix()[rowIndex],
51-
attributes = JSON.parse(product.attribute);
51+
attributes = JSON.parse(product.attribute),
52+
filterModifier = product.productId ? {
53+
'entity_id': {
54+
'condition_type': 'neq', value: product.productId
55+
}
56+
} : {};
5257
this.rowIndexToEdit = rowIndex;
5358

59+
filterModifier = _.extend(filterModifier, _.mapObject(attributes, function (value) {
60+
return {
61+
'condition_type': 'eq',
62+
'value': value
63+
};
64+
}));
5465
this.associatedProductGrid().open(
5566
{
5667
'filters': attributes,
57-
'filters_modifier': product.productId ? {
58-
'entity_id': {
59-
'condition_type': 'neq', value: product.productId
60-
}
61-
} : {}
68+
'filters_modifier': filterModifier
6269
},
6370
'changeProduct',
6471
false

app/code/Magento/Ui/view/base/web/templates/grid/cells/multiselect.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
data-action="select-row"
1212
data-bind="
1313
staticChecked: $col.selected,
14+
disable: $col.disabled.indexOf($row()[$col.indexField]) != -1 ,
1415
checkedValue: $row()[$col.indexField],
1516
attr: {
1617
id: 'check' + $row()[$col.indexField]

0 commit comments

Comments
 (0)