@@ -56,7 +56,7 @@ define([
5656 }
5757 } ) ;
5858
59- jQuery . async ( '#order-items .admin__page-section-title ' , ( function ( ) {
59+ jQuery . async ( '#order-items' , ( function ( ) {
6060 this . dataArea = new OrderFormArea ( 'data' , $ ( this . getAreaId ( 'data' ) ) , this ) ;
6161 this . itemsArea = Object . extend ( new OrderFormArea ( 'items' , $ ( this . getAreaId ( 'items' ) ) , this ) , {
6262 addControlButton : function ( button ) {
@@ -84,20 +84,23 @@ define([
8484 } , 10 ) ;
8585 } ;
8686
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- } ) ;
87+ jQuery . async ( '#order-items .admin__page-section-title' , ( function ( ) {
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+ } ) ;
9293
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 ( ) ;
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+ } ) . bind ( this ) ) ;
101104
102105 } ) . bind ( this ) ) ;
103106
0 commit comments