Skip to content

Commit 177a7d0

Browse files
author
Maksym Aposov
committed
MAGETWO-43887: 'Select All' checkbox is missed in 'Add Products to Group' grid if create Grouped product
1 parent 24abff1 commit 177a7d0

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@
2424
<arguments>
2525
<argument name="id" xsi:type="string">grouped_grid_popup</argument>
2626
</arguments>
27-
<block class="Magento\Backend\Block\Widget\Grid\Column" as="entity_id">
27+
<block class="Magento\Backend\Block\Widget\Grid\Column" as="entity_ids">
2828
<arguments>
29-
<argument name="header" xsi:type="string" translate="true">ID</argument>
3029
<argument name="type" xsi:type="string">skip-list</argument>
3130
<argument name="renderer" xsi:type="string">Magento\Backend\Block\Widget\Grid\Column\Renderer\Checkbox</argument>
31+
<argument name="name" xsi:type="string">entity_ids</argument>
32+
<argument name="index" xsi:type="string">entity_id</argument>
33+
</arguments>
34+
</block>
35+
<block class="Magento\Backend\Block\Widget\Grid\Column" as="entity_id">
36+
<arguments>
37+
<argument name="header" xsi:type="string" translate="true">ID</argument>
3238
<argument name="index" xsi:type="string">entity_id</argument>
3339
</arguments>
3440
</block>

app/code/Magento/GroupedProduct/view/adminhtml/web/js/grouped-product.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ define([
132132

133133
if (!target.is('input')) {
134134
target.closest('[data-role=row]')
135-
.find('[data-column=entity_id] input')
135+
.find('[data-column=entity_ids] input')
136136
.prop('checked', function (element, value) {
137137
return !value;
138138
})
@@ -142,7 +142,7 @@ define([
142142

143143
popup.on(
144144
'change',
145-
'[data-role=row] [data-column=entity_id] input',
145+
'[data-role=row] [data-column=entity_ids] input',
146146
$.proxy(function (event) {
147147
var element = $(event.target),
148148
product = {};
@@ -175,12 +175,12 @@ define([
175175
return $(element).val();
176176
}).toArray();
177177
ajaxSettings.data.filter = $.extend(ajaxSettings.data.filter || {}, {
178-
'entity_id': ids
178+
'entity_ids': ids
179179
});
180180
})
181181
.on('gridajax', function (event, ajaxRequest) {
182182
ajaxRequest.done(function () {
183-
popup.find('[data-role=row] [data-column=entity_id] input')
183+
popup.find('[data-role=row] [data-column=entity_ids] input')
184184
.each(function (index, element) {
185185
var $element = $(element);
186186
$element.prop('checked', !!selectedProductList[$element.val()]);

0 commit comments

Comments
 (0)