@@ -56,7 +56,7 @@ define([
56
56
}
57
57
} ) ;
58
58
59
- jQuery . async ( '#order-items' , ( function ( ) {
59
+ jQuery . async ( '#order-items .admin__page-section-title ' , ( function ( ) {
60
60
this . dataArea = new OrderFormArea ( 'data' , $ ( this . getAreaId ( 'data' ) ) , this ) ;
61
61
this . itemsArea = Object . extend ( new OrderFormArea ( 'items' , $ ( this . getAreaId ( 'items' ) ) , this ) , {
62
62
addControlButton : function ( button ) {
@@ -84,22 +84,21 @@ define([
84
84
} , 10 ) ;
85
85
} ;
86
86
87
- if ( jQuery ( '#' + this . getAreaId ( 'items' ) ) . ready ( ) ) {
88
- this . dataArea . onLoad = this . dataArea . onLoad . wrap ( function ( proceed ) {
89
- proceed ( ) ;
90
- this . _parent . itemsArea . setNode ( $ ( this . _parent . getAreaId ( 'items' ) ) ) ;
91
- this . _parent . itemsArea . onLoad ( ) ;
92
- } ) ;
87
+ this . dataArea . onLoad = this . dataArea . onLoad . wrap ( function ( proceed ) {
88
+ proceed ( ) ;
89
+ this . _parent . itemsArea . setNode ( $ ( this . _parent . getAreaId ( 'items' ) ) ) ;
90
+ this . _parent . itemsArea . onLoad ( ) ;
91
+ } ) ;
92
+
93
+ this . itemsArea . onLoad = this . itemsArea . onLoad . wrap ( function ( proceed ) {
94
+ proceed ( ) ;
95
+ if ( $ ( searchAreaId ) && ! jQuery ( '#' + searchAreaId ) . is ( ':visible' ) && ! $ ( searchButtonId ) ) {
96
+ this . addControlButton ( searchButton ) ;
97
+ }
98
+ } ) ;
99
+ this . areasLoaded ( ) ;
100
+ this . itemsArea . onLoad ( ) ;
93
101
94
- this . itemsArea . onLoad = this . itemsArea . onLoad . wrap ( function ( proceed ) {
95
- proceed ( ) ;
96
- if ( $ ( searchAreaId ) && ! jQuery ( '#' + searchAreaId ) . is ( ':visible' ) && ! $ ( searchButtonId ) ) {
97
- this . addControlButton ( searchButton ) ;
98
- }
99
- } ) ;
100
- this . areasLoaded ( ) ;
101
- this . itemsArea . onLoad ( ) ;
102
- }
103
102
} ) . bind ( this ) ) ;
104
103
105
104
jQuery ( '#edit_form' )
0 commit comments