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 } ) ;
@@ -1383,12 +1384,15 @@ define([
13831384 _label : '' ,
13841385 _node : null ,
13851386
1386- initialize : function ( label ) {
1387+ initialize : function ( label , id ) {
13871388 this . _label = label ;
13881389 this . _node = new Element ( 'button' , {
13891390 'class' : 'action-secondary action-add' ,
13901391 'type' : 'button'
13911392 } ) ;
1393+ if ( typeof id !== 'undefined' ) {
1394+ this . _node . setAttribute ( 'id' , id )
1395+ }
13921396 } ,
13931397
13941398 onClick : function ( ) {
You can’t perform that action at this time.
0 commit comments