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
} ) ;
@@ -1394,12 +1395,15 @@ define([
1394
1395
_label : '' ,
1395
1396
_node : null ,
1396
1397
1397
- initialize : function ( label ) {
1398
+ initialize : function ( label , id ) {
1398
1399
this . _label = label ;
1399
1400
this . _node = new Element ( 'button' , {
1400
1401
'class' : 'action-secondary action-add' ,
1401
1402
'type' : 'button'
1402
1403
} ) ;
1404
+ if ( typeof id !== 'undefined' ) {
1405
+ this . _node . setAttribute ( 'id' , id )
1406
+ }
1403
1407
} ,
1404
1408
1405
1409
onClick : function ( ) {
You can’t perform that action at this time.
0 commit comments