File tree 1 file changed +7
-3
lines changed
app/code/Magento/Sales/view/adminhtml/web/order/create
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ define([
55
55
}
56
56
} ) ;
57
57
58
- var searchButton = new ControlButton ( jQuery . mage . __ ( 'Add Products' ) ) ,
58
+ var searchButtonId = 'add_products' ,
59
+ searchButton = new ControlButton ( jQuery . mage . __ ( 'Add Products' ) , searchButtonId ) ,
59
60
searchAreaId = this . getAreaId ( 'search' ) ;
60
61
searchButton . onClick = function ( ) {
61
62
$ ( searchAreaId ) . show ( ) ;
@@ -74,7 +75,7 @@ define([
74
75
75
76
this . itemsArea . onLoad = this . itemsArea . onLoad . wrap ( function ( proceed ) {
76
77
proceed ( ) ;
77
- if ( $ ( searchAreaId ) && ! $ ( searchAreaId ) . visible ( ) ) {
78
+ if ( $ ( searchAreaId ) && ! $ ( searchAreaId ) . visible ( ) && ! $ ( searchButtonId ) ) {
78
79
this . addControlButton ( searchButton ) ;
79
80
}
80
81
} ) ;
@@ -1383,12 +1384,15 @@ define([
1383
1384
_label : '' ,
1384
1385
_node : null ,
1385
1386
1386
- initialize : function ( label ) {
1387
+ initialize : function ( label , id ) {
1387
1388
this . _label = label ;
1388
1389
this . _node = new Element ( 'button' , {
1389
1390
'class' : 'action-secondary action-add' ,
1390
1391
'type' : 'button'
1391
1392
} ) ;
1393
+ if ( typeof id !== 'undefined' ) {
1394
+ this . _node . setAttribute ( 'id' , id )
1395
+ }
1392
1396
} ,
1393
1397
1394
1398
onClick : function ( ) {
You can’t perform that action at this time.
0 commit comments