Make WordPress Core


Ignore:
Timestamp:
09/21/2011 06:16:24 AM (14 years ago)
Author:
azaozz
Message:

Responsive admin improvements for the dashboard, new/write screens and links screens, see #18198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r18683 r18736  
    4949?>
    5050<script type="text/javascript">
    51 //<![CDATA[
    5251addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    5352var userSettings = {
     
    6362    decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
    6463    isRtl = <?php echo (int) is_rtl(); ?>;
    65 
    66     function wp_set_width_class() {
    67         var w = document.body.clientWidth, bc = document.body.className;
    68 
    69         if ( w <= 680 )
    70             document.body.className = bc.replace(/ (small|narrow|medium|wide)-window/, '') + ' small-window';
    71         else if ( w > 680 && w <= 950 )
    72             document.body.className = bc.replace(/ (small|narrow|medium|wide)-window/, '') + ' narrow-window';
    73         else if ( w > 950 && w <= 1300 )
    74             document.body.className = bc.replace(/ (small|narrow|medium|wide)-window/, '') + ' medium-window';
    75         else
    76             document.body.className = bc.replace(/ (small|narrow|medium|wide)-window/, '') + ' wide-window';
    77     }
    78 //]]>
    7964</script>
    8065<?php
     
    9984    $admin_body_class .= ' rtl';
    10085
    101 if ( get_user_setting('responsive') )
    102     $admin_body_class .= ' responsive';
    103 
    10486$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
    10587$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
     
    11395<script type="text/javascript">
    11496document.body.className = document.body.className.replace(/no-js/, 'js');
    115 wp_set_width_class();
     97if ( document.body.clientWidth > 1300 )
     98    document.body.className += ' wide-window';
    11699</script>
    117100
Note: See TracChangeset for help on using the changeset viewer.