Ticket #23449: 23449.6.diff
File 23449.6.diff, 3.4 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/template.php
984 984 */ 985 985 function do_accordion_sections( $screen, $context, $object ) { 986 986 global $wp_meta_boxes; 987 988 if ( ! wp_script_is( 'accordion', 'queue' ) ) 989 wp_enqueue_script( 'accordion' ); 987 990 988 991 if ( empty( $screen ) ) 989 992 $screen = get_current_screen(); -
wp-admin/js/accordion.js
18 18 section.toggleClass( 'open' ); 19 19 }); 20 20 }); 21 22 // Refresh selected accordion option when screen options are toggled 23 $('.hide-postbox-tog').click(function () { 24 accordion.init(); 25 }); 26 27 // Show the first accordion option by default 28 accordion.init(); 29 30 (function($){ 31 accordion = { 32 init : function() { 33 var accordionOptions = $( '.accordion-container li.accordion-section' ); 34 accordionOptions.removeClass( 'open' ); 35 accordionOptions.filter( ':visible' ).first().addClass( 'open' ); 36 } 37 }; 38 })(jQuery); 39 No newline at end of file -
wp-admin/js/nav-menu.js
53 53 this.initAccessibility(); 54 54 55 55 this.initToggles(); 56 57 // Open first accordion option58 this.initAccordion();59 56 }, 60 57 61 58 jQueryExtensions : function() { … … 267 264 }); 268 265 }, 269 266 270 initAccordion : function() {271 var accordionOptions = $( '.accordion-container li.accordion-section' );272 accordionOptions.removeClass('open');273 accordionOptions.filter(':visible').first().addClass( 'open' );274 },275 276 267 countMenuItems : function( depth ) { 277 268 return $( '.menu-item-depth-' + depth ).length; 278 269 }, … … 544 535 api.menuList.hideAdvancedMenuItemFields(); 545 536 546 537 $('.hide-postbox-tog').click(function () { 547 api.initAccordion();548 549 538 var hidden = $( '.accordion-container li.accordion-section' ).filter(':hidden').map(function() { return this.id; }).get().join(','); 550 539 $.post(ajaxurl, { 551 540 action: 'closed-postboxes', -
wp-admin/nav-menus.php
23 23 wp_die( __( 'Cheatin’ uh?' ) ); 24 24 25 25 wp_enqueue_script( 'nav-menu' ); 26 wp_enqueue_script( 'accordion' );27 26 28 27 if ( wp_is_mobile() ) 29 28 wp_enqueue_script( 'jquery-touch-punch' ); -
wp-admin/css/wp-admin.css
7438 7438 margin: 0; 7439 7439 } 7440 7440 7441 .accordion-container .accordion-section:first-child { 7441 #nav-menu-meta .accordion-container .accordion-section:first-child { 7442 7442 -webkit-border-top-right-radius: 3px; 7443 7443 -webkit-border-top-left-radius: 3px; 7444 7444 border-top-right-radius: 3px; 7445 7445 border-top-left-radius: 3px; 7446 7446 } 7447 7447 7448 .accordion-container .accordion-section:last-child { 7448 #nav-menu-meta .accordion-container .accordion-section:last-child { 7449 7449 -webkit-border-bottom-right-radius: 3px; 7450 7450 -webkit-border-bottom-left-radius: 3px; 7451 7451 border-bottom-right-radius: 3px;