Skip to content

Commit 9b8f6dc

Browse files
author
Andrii Lugovyi
committed
MAGETWO-28913: Grid actions in custom options dialog do not work
- moved event listener
1 parent 5e8b706 commit 9b8f6dc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/custom-options.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ define([
139139
$(this).closest('.ui-dialog').css('margin-top', topMargin);
140140

141141
$(this).addClass('admin__scope-old'); // ToDo UI: remove with old styles removal
142+
143+
$('#productGrid_massaction-form button').on('click', function () {
144+
$('#import-custom-options-apply-button').trigger('click', 'massActionTrigger');
145+
});
142146
},
143147
close: function () {
144148
$(this).closest('.ui-dialog').removeClass('ui-dialog-active');
@@ -195,19 +199,14 @@ define([
195199
}]
196200
});
197201
importContainer.load(
198-
this.options.productGridUrl, {
199-
form_key: this.options.formKey
200-
},
202+
this.options.productGridUrl,
203+
{form_key: this.options.formKey},
201204
function () {
202205
importContainer.dialog('open');
203206
}
204207
);
205208
},
206209

207-
'click #productGrid_massaction-form button': function () {
208-
$('#import-custom-options-apply-button').trigger('click', 'massActionTrigger');
209-
},
210-
211210
/**
212211
* Change custom option type
213212
*/
@@ -470,4 +469,4 @@ define([
470469
}
471470
});
472471

473-
});
472+
});

0 commit comments

Comments
 (0)