Ticket #23449: 23449.5.diff
File 23449.5.diff, 5.7 KB (added by , 11 years ago) |
---|
-
wp-admin/css/wp-admin.css
7579 7579 border-radius: 3px; 7580 7580 } 7581 7581 7582 7583 #nav-menu-meta .accordion-container .accordion-section:first-child { 7584 -webkit-border-top-right-radius: 3px; 7585 -webkit-border-top-left-radius: 3px; 7586 border-top-right-radius: 3px; 7587 border-top-left-radius: 3px; 7588 } 7589 7590 #nav-menu-meta .accordion-container .accordion-section:last-child { 7591 -webkit-border-bottom-right-radius: 3px; 7592 -webkit-border-bottom-left-radius: 3px; 7593 border-bottom-right-radius: 3px; 7594 border-bottom-left-radius: 3px; 7595 } 7596 7582 7597 .accordion-section ul.category-tabs, 7583 7598 .accordion-section ul.add-menu-item-tabs, 7584 7599 .accordion-section ul.wp-tab-bar { … … 7589 7604 margin: 13px 0; 7590 7605 } 7591 7606 7592 #nav-menu-meta .accordion-section-content {7593 padding: 18px 13px;7594 }7595 7596 7607 #nav-menu-meta .button-controls { 7597 7608 margin-bottom: 0; 7598 7609 } … … 7843 7854 margin-top: 0; 7844 7855 } 7845 7856 7846 .accordion-container .accordion-section:first-child {7847 -webkit-border-top-right-radius: 3px;7848 -webkit-border-top-left-radius: 3px;7849 border-top-right-radius: 3px;7850 border-top-left-radius: 3px;7851 }7852 7853 .accordion-container .accordion-section:last-child {7854 -webkit-border-bottom-right-radius: 3px;7855 -webkit-border-bottom-left-radius: 3px;7856 border-bottom-right-radius: 3px;7857 border-bottom-left-radius: 3px;7858 }7859 7860 7857 .customlinkdiv .howto input { 7861 7858 width: 180px; 7862 7859 } … … 9299 9296 9300 9297 .accordion-section-content { 9301 9298 display: none; 9302 padding: 10px 20px 15px;9299 padding: 8px 13px 13px; 9303 9300 overflow: hidden; 9304 9301 } 9305 9302 9303 #submitdiv .accordion-section-content { 9304 padding: 0; 9305 } 9306 9306 9307 .accordion-section-title { 9307 9308 margin: 0; 9308 9309 padding: 15px 20px; … … 9347 9348 display: none; 9348 9349 } 9349 9350 9350 .control-section .accordion-section-title { 9351 .control-section .accordion-section-title, 9352 #poststuff .control-section .accordion-section-title { 9351 9353 padding: 10px 20px; 9352 9354 font-size: 15px; 9353 9355 font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; … … 9373 9375 .control-section:hover .accordion-section-title, 9374 9376 .control-section .accordion-section-title:hover, 9375 9377 .control-section.open .accordion-section-title, 9376 .control-section .accordion-section-title:focus { 9378 .control-section .accordion-section-title:focus, 9379 #poststuff .control-section:hover .accordion-section-title, 9380 #poststuff .control-section .accordion-section-title:hover, 9381 #poststuff .control-section.open .accordion-section-title, 9382 #poststuff .control-section .accordion-section-title:focus { 9377 9383 color: #fff; 9378 9384 text-shadow: 0 -1px 0 #333; 9379 9385 background: #808080; -
wp-admin/includes/template.php
985 985 function do_accordion_sections( $screen, $context, $object ) { 986 986 global $wp_meta_boxes; 987 987 988 wp_enqueue_script( 'accordion' ); 989 988 990 if ( empty( $screen ) ) 989 991 $screen = get_current_screen(); 990 992 elseif ( is_string( $screen ) ) -
wp-admin/js/accordion.js
14 14 section.toggleClass( 'open' ); 15 15 }); 16 16 }); 17 18 // Refresh selected accordion option when screen options are toggled 19 $('.hide-postbox-tog').click(function () { 20 accordion.init(); 21 }); 22 23 // Show the first accordion option by default 24 accordion.init(); 25 26 (function($){ 27 accordion = { 28 init : function() { 29 var accordionOptions = $( '.accordion-container li.accordion-section' ); 30 accordionOptions.removeClass( 'open' ); 31 accordionOptions.filter( ':visible' ).first().addClass( 'open' ); 32 } 33 }; 34 })(jQuery); 35 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/js/postbox.js
144 144 }); 145 145 146 146 if ( side.length ) { 147 if ($('#postbox-container-1').find('accordion-container')) 148 return; 149 147 150 if ( side.children('.postbox:visible').length ) 148 151 side.removeClass('empty-container'); 149 152 else if ( $('#postbox-container-1').css('width') == '280px' ) -
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' );