File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/code/Magento/Sales/view/adminhtml/web/order/create Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ define([
5555 }
5656 } ) ;
5757
58- var searchButton = new ControlButton ( jQuery . mage . __ ( 'Add Products' ) ) ,
58+ var searchButtonId = 'add_products' ,
59+ searchButton = new ControlButton ( jQuery . mage . __ ( 'Add Products' ) , searchButtonId ) ,
5960 searchAreaId = this . getAreaId ( 'search' ) ;
6061 searchButton . onClick = function ( ) {
6162 $ ( searchAreaId ) . show ( ) ;
@@ -74,7 +75,7 @@ define([
7475
7576 this . itemsArea . onLoad = this . itemsArea . onLoad . wrap ( function ( proceed ) {
7677 proceed ( ) ;
77- if ( $ ( searchAreaId ) && ! $ ( searchAreaId ) . visible ( ) ) {
78+ if ( $ ( searchAreaId ) && ! $ ( searchAreaId ) . visible ( ) && ! $ ( searchButtonId ) ) {
7879 this . addControlButton ( searchButton ) ;
7980 }
8081 } ) ;
@@ -1394,12 +1395,15 @@ define([
13941395 _label : '' ,
13951396 _node : null ,
13961397
1397- initialize : function ( label ) {
1398+ initialize : function ( label , id ) {
13981399 this . _label = label ;
13991400 this . _node = new Element ( 'button' , {
14001401 'class' : 'action-secondary action-add' ,
14011402 'type' : 'button'
14021403 } ) ;
1404+ if ( typeof id !== 'undefined' ) {
1405+ this . _node . setAttribute ( 'id' , id )
1406+ }
14031407 } ,
14041408
14051409 onClick : function ( ) {
You can’t perform that action at this time.
0 commit comments