Ticket #23449: 23449.15b.diff
File 23449.15b.diff, 1.8 KB (added by , 11 years ago) |
---|
-
wp-admin/css/wp-admin.css
8997 8997 cursor: pointer; 8998 8998 } 8999 8999 9000 .js .open .accordion-section-title { 9001 cursor: default; 9002 } 9003 9000 9004 .js .accordion-section-title:after { 9001 9005 content: ''; 9002 9006 width: 0; -
wp-admin/js/accordion.js
9 9 e.preventDefault(); // Keep this AFTER the key filter above 10 10 11 11 accordionSwitch( $( this ) ); 12 accordionCorners();13 12 }); 14 13 15 14 // Refresh selected accordion option when screen options are toggled … … 27 26 accordionOptions.removeClass( 'top bottom' ); 28 27 accordionOptions.filter( ':visible' ).first().addClass( 'top' ); 29 28 accordionOptions.filter( ':visible' ).last().addClass( 'bottom' ).find( sectionContent ).addClass('bottom'); 30 } ;29 } 31 30 32 31 function accordionInit () { 33 32 accordionSwitch( accordionOptions.filter( ':visible' ).first() ); … … 36 35 37 36 function accordionSwitch ( el ) { 38 37 var section = el.closest( '.accordion-section' ), 39 40 38 siblings = section.parent().find( '.open' ), 39 content = section.find( sectionContent ); 41 40 42 if ( section.hasClass( 'cannot-expand' ) )41 if ( section.hasClass( 'cannot-expand' ) || section.hasClass( 'open' ) ) 43 42 return; 44 43 45 44 siblings.removeClass( 'open' ); 46 45 siblings.find( sectionContent ).show().slideUp( 150 ); 47 46 content.toggle( section.hasClass( 'open' ) ).slideToggle( 150 ); 48 47 section.toggleClass( 'open' ); 48 49 accordionCorners(); 49 50 } 50 51 51 52 // Show the first accordion option by default