Skip to content

Commit 97376aa

Browse files
author
Andrii Lugovyi
committed
MAGETWO-28913: Grid actions in custom options dialog do not work
- moved event listener to create method
1 parent 9b8f6dc commit 97376aa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,18 @@ define([
132132
at: 'center top',
133133
of: 'body'
134134
},
135+
create: function (event, ui) {
136+
$(document).on('click', '#productGrid_massaction-form button', function () {
137+
$('#import-custom-options-apply-button').trigger('click', 'massActionTrigger');
138+
});
139+
},
135140
open: function () {
136141
$(this).closest('.ui-dialog').addClass('ui-dialog-active');
137142

138143
var topMargin = $(this).closest('.ui-dialog').children('.ui-dialog-titlebar').outerHeight() + 135;
139144
$(this).closest('.ui-dialog').css('margin-top', topMargin);
140145

141146
$(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-
});
146147
},
147148
close: function () {
148149
$(this).closest('.ui-dialog').removeClass('ui-dialog-active');

0 commit comments

Comments
 (0)