Make WordPress Core

Changeset 26392


Ignore:
Timestamp:
11/26/2013 05:08:37 AM (11 years ago)
Author:
helen
Message:

Dashboard columns:

  • Improve responsive breakpoints for.
  • Remove obsolete network admin option.
  • Remove unnecessary JS.

props SergeyBiryukov, kraftbj, lessbloat. fixes #26074.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/wp-admin.css

    r26389 r26392  
    24412441
    24422442/* two columns on the dash, but keep the setting if one is selected */
    2443 @media only screen and (min-width: 800px) and (max-width: 1399px) {
     2443@media only screen and (min-width: 800px) and (max-width: 1499px) {
    24442444    #wpbody-content #dashboard-widgets .postbox-container {
    24452445        width: 49.5%;
     
    24832483
    24842484/* three columns on the dash */
    2485 @media only screen and (min-width: 1400px) and (max-width: 1800px) {
     2485@media only screen and (min-width: 1500px) and (max-width: 1800px) {
    24862486    #wpbody-content #dashboard-widgets .postbox-container {
    24872487        width: 33.5%;
  • trunk/src/wp-admin/includes/dashboard.php

    r26337 r26392  
    136136function wp_dashboard() {
    137137    $screen = get_current_screen();
    138     $class = 'columns-' . get_current_screen()->get_columns();
    139138
    140139?>
    141 <div id="dashboard-widgets" class="metabox-holder <?php echo $class; ?>">
     140<div id="dashboard-widgets" class="metabox-holder">
    142141    <div id='postbox-container-1' class='postbox-container'>
    143142    <?php do_meta_boxes( $screen->id, 'normal', '' ); ?>
  • trunk/src/wp-admin/js/dashboard.js

    r26390 r26392  
    77        welcomePanelHide = $('#wp_welcome_panel-hide'),
    88        updateWelcomePanel,
    9         metaboxHolder = $( '.metabox-holder' ),
    10         updateColumnCount;
     9        metaboxHolder = $( '.metabox-holder' );
    1110
    1211    updateWelcomePanel = function( visible ) {
     
    133132    });
    134133
    135     updateColumnCount = function( $window, $holder ) {
    136         var cols = 1,
    137             windowWidth = parseInt( $window.width(), 10 );
    138 
    139         if (799 < windowWidth && 1299 > windowWidth) {
    140             cols = 2;
    141         }
    142 
    143         if (1300 < windowWidth && 1799 > windowWidth) {
    144             cols = 3;
    145         }
    146 
    147         if (1800 < windowWidth) {
    148             cols = 4;
    149         }
    150 
    151         $holder.attr( 'class', $holder.attr( 'class' ).replace( /columns-\d+/, 'columns-' + cols ) );
    152     };
    153 
    154     // Update main column count on load
    155     updateColumnCount( $window, metaboxHolder );
    156 
    157     $window.on( 'resize', _.debounce(function() {
    158         updateColumnCount( $window, metaboxHolder );
    159     }, 30 ) );
    160 
    161134} );
  • trunk/src/wp-admin/network/index.php

    r25616 r26392  
    6161add_thickbox();
    6262
    63 add_screen_option('layout_columns', array('max' => 4, 'default' => 2) );
    64 
    6563require_once( ABSPATH . 'wp-admin/admin-header.php' );
    6664
Note: See TracChangeset for help on using the changeset viewer.