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([
496
496
}
497
497
498
498
// toggle target row
499
- headElement = $ ( idTo + '-head' ) ;
499
+ headElement = jQuery ( '#' + idTo + '-head' ) ;
500
500
isInheritCheckboxChecked = $ ( idTo + '_inherit' ) && $ ( idTo + '_inherit' ) . checked ;
501
501
target = $ ( idTo ) ;
502
502
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
+
503
508
// Target won't always exist (for example, if field type is "label")
504
509
if ( target ) {
505
510
inputs = target . up ( this . _config [ 'levels_up' ] ) . select ( 'input' , 'select' , 'td' ) ;
@@ -529,10 +534,10 @@ define([
529
534
} ) ;
530
535
}
531
536
532
- if ( headElement ) {
537
+ if ( headElement . length > 0 ) {
533
538
headElement . show ( ) ;
534
539
535
- if ( headElement . hasClassName ( 'open' ) && target ) {
540
+ if ( headElement . hasClass ( 'open' ) && target ) {
536
541
target . show ( ) ;
537
542
} else if ( target ) {
538
543
target . hide ( ) ;
@@ -567,7 +572,7 @@ define([
567
572
} ) ;
568
573
}
569
574
570
- if ( headElement ) {
575
+ if ( headElement . length > 0 ) {
571
576
headElement . hide ( ) ;
572
577
}
573
578
You can’t perform that action at this time.
0 commit comments