File tree Expand file tree Collapse file tree 2 files changed +25
-10
lines changed
app/code/Magento/Ui/view/base
web/js/grid/controls/button Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 1717 </button>
1818 <?php if ($ block ->hasSplit ()): ?>
1919 <button <?= $ block ->getToggleAttributesHtml () ?> >
20- <span>Select</span>
20+ <span><?= /* @escapeNotVerified */ __ ( ' Select ' ); ?> </span>
2121 </button>
2222
2323 <?php if (!$ block ->getDisabled ()): ?>
4040 <?php endif ; ?>
4141 <?php endif ; ?>
4242</div>
43-
44- <script>
45- require(['jquery'], function($){
46- $('.actions-split')
47- .on('click.splitDefault', '.action-default', function() {
48- $(this).siblings('.dropdown-menu').find('.item-default').trigger('click');
49- });
50- });
51- </script>
43+ <script type="text/x-magento-init">
44+ {
45+ ".actions-split": {
46+ "Magento_Ui/js/grid/controls/button/split": {}
47+ }
48+ }
49+ </script>
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright © Magento, Inc. All rights reserved.
3+ * See COPYING.txt for license details.
4+ */
5+
6+ define ( [
7+ 'jquery'
8+ ] , function ( $ ) {
9+ 'use strict' ;
10+
11+ return function ( data , element ) {
12+
13+ $ ( element ) . on ( 'click.splitDefault' , '.action-default' , function ( ) {
14+ $ ( this ) . siblings ( '.dropdown-menu' ) . find ( '.item-default' ) . trigger ( 'click' ) ;
15+ } ) ;
16+ } ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments