File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -496,10 +496,15 @@ define([
496496 }
497497
498498 // toggle target row
499- headElement = $ ( idTo + '-head' ) ;
499+ headElement = jQuery ( '#' + idTo + '-head' ) ;
500500 isInheritCheckboxChecked = $ ( idTo + '_inherit' ) && $ ( idTo + '_inherit' ) . checked ;
501501 target = $ ( idTo ) ;
502502
503+ // Account for the chooser style parameters.
504+ if ( target === null && headElement . length === 0 && idTo . substring ( 0 , 16 ) === 'options_fieldset' ) {
505+ headElement = jQuery ( '.field-' + idTo ) . add ( '.field-chooser' + idTo ) ;
506+ }
507+
503508 // Target won't always exist (for example, if field type is "label")
504509 if ( target ) {
505510 inputs = target . up ( this . _config [ 'levels_up' ] ) . select ( 'input' , 'select' , 'td' ) ;
@@ -529,10 +534,10 @@ define([
529534 } ) ;
530535 }
531536
532- if ( headElement ) {
537+ if ( headElement . length > 0 ) {
533538 headElement . show ( ) ;
534539
535- if ( headElement . hasClassName ( 'open' ) && target ) {
540+ if ( headElement . hasClass ( 'open' ) && target ) {
536541 target . show ( ) ;
537542 } else if ( target ) {
538543 target . hide ( ) ;
@@ -567,7 +572,7 @@ define([
567572 } ) ;
568573 }
569574
570- if ( headElement ) {
575+ if ( headElement . length > 0 ) {
571576 headElement . hide ( ) ;
572577 }
573578
You can’t perform that action at this time.
0 commit comments