Plugin Directory

Changeset 785996


Ignore:
Timestamp:
10/10/2013 04:16:49 PM (12 years ago)
Author:
lessbloat
Message:

A couple of changes, including:

  • Set main column count class via JS
  • Show dashed sort border only when sorting
  • 2 columns for main Macbook resolution
  • Removed some unnecessary bold
Location:
dashboard/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • dashboard/trunk/css/dash-rwd.css

    r785534 r785996  
    2121
    2222/* two columns on the dash */
    23 @media only screen and (min-width: 800px) and (max-width: 1199px) {
     23@media only screen and (min-width: 800px) and (max-width: 1299px) {
    2424    #wpbody-content #dashboard-widgets .postbox-container {
    2525        width: 49.5%;
     
    4242
    4343/* three columns on the dash */
    44 @media only screen and (min-width: 1200px) and (max-width: 1800px) {
     44@media only screen and (min-width: 1300px) and (max-width: 1800px) {
    4545    #wpbody-content #dashboard-widgets .postbox-container {
    4646        width: 33.5%;
     
    6262    }
    6363}
     64
     65.metabox-holder .postbox-container .empty-container {
     66    border: none;
     67}
     68
     69#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container {
     70    border: none !important;
     71}
     72
     73.postbox-container,
     74.meta-box-sortables {
     75    min-height: 245px;
     76}
  • dashboard/trunk/js/dash-rwd.js

    r785524 r785996  
     1jQuery(document).ready(function ($) {
     2    // Update main column count on load
     3    updateColumnCount();
     4   
     5    // Show dashed box only on sort
     6    var emptyContainers = $('.postbox-container .empty-container');
     7    $('.meta-box-sortables').on('sortstart', function(event, ui) {
     8        emptyContainers.css('border', '3px dashed #CCCCCC');   
     9    }).on( 'sortbeforestop', function(event, ui) {
     10        emptyContainers.css('border', 'none');
     11    }).on( 'sortover', function(event, ui) {
     12        $(event.target).find(emptyContainers).css('border', 'none');
     13    }).on( 'sortout', function(event, ui) {
     14        $(event.target).find(emptyContainers).css('border', '3px dashed #CCCCCC');
     15    });
     16});
     17jQuery(window).resize( _.debounce( function(){
     18    updateColumnCount();
     19}, 50) );
     20function updateColumnCount() {
     21    var cols = 1,
     22        windowWidth = parseInt(jQuery(window).width());
     23    if (799 < windowWidth && 1299 > windowWidth)
     24        cols = 2;
     25    if (1300 < windowWidth && 1799 > windowWidth)
     26        cols = 3;
     27    if (1800 < windowWidth)
     28        cols = 4;
     29    jQuery('.metabox-holder').attr('class', jQuery('.metabox-holder').attr('class').replace(/columns-\d+/, 'columns-' + cols));
     30}
  • dashboard/trunk/quickdraft.php

    r785460 r785996  
    9292            $url = get_edit_post_link( $draft->ID );
    9393            $title = _draft_or_post_title( $draft->ID );
    94             $item = '<h4><a href="'.$url.'" title="' . sprintf( __( 'Edit &#8220;%s&#8221;' ), esc_attr( $title ) ) . '">' . esc_html($title) . '</a> <time datetime="' . get_the_time( 'c', $draft) . '">' . get_the_time( get_option( 'date_format' ), $draft ) . '</time></h4>';
     94            $item = '<a href="'.$url.'" title="' . sprintf( __( 'Edit &#8220;%s&#8221;' ), esc_attr( $title ) ) . '">' . esc_html($title) . '</a> <time datetime="' . get_the_time( 'c', $draft) . '">' . get_the_time( get_option( 'date_format' ), $draft ) . '</time>';
    9595            if ( $the_content = wp_trim_words( $draft->post_content, 10 ) )
    9696                $item .= '<p>' . $the_content . '</p>';
  • dashboard/trunk/rightnow.php

    r785664 r785996  
    9797    ?>
    9898    </ul>
    99     <p><?php printf( __('<strong>WordPress %1$s</strong> running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p>
     99    <p><?php printf( __('WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p>
    100100    </div>
    101101
Note: See TracChangeset for help on using the changeset viewer.