WordPress.org

Make WordPress Core

Changeset 7291


Ignore:
Timestamp:
03/14/2008 04:51:39 PM (14 years ago)
Author:
westi
Message:

Allow you to click on the colours or label to select a colour scheme. Fixes #6198 props nbachiyski.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r7273 r7291  
    4343    }
    4444
    45     jQuery(document).ready( function() { jQuery('#pass1').keyup( check_pass_strength ) } );
     45    jQuery(function($) {
     46        $('#pass1').keyup( check_pass_strength )
     47        $('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
     48    } );
    4649</script>
    4750<?php
     
    162165    $current_color = 'classic';
    163166foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
    164 <label class="color-option"><input name="admin_color" type="radio" value="<?php echo $color ?>" class="tog" <?php checked($color, $current_color); ?> />
     167<div class="color-option"><input name="admin_color" id="admin_color_<?php echo $color; ?>" type="radio" value="<?php echo $color ?>" class="tog" <?php checked($color, $current_color); ?> />
    165168    <table class="color-palette">
    166169    <tr>
    167170    <?php
    168     foreach ( $color_info->colors as $color ): ?>
    169     <td style="background-color: <?php echo $color ?>" title="<?php echo $color ?>">&nbsp;</td>
     171    foreach ( $color_info->colors as $html_color ): ?>
     172    <td style="background-color: <?php echo $html_color ?>" title="<?php echo $color ?>">&nbsp;</td>
    170173    <?php endforeach; ?>
    171174    </tr>
    172175    </table>
    173176   
    174     <?php echo $color_info->name ?>
    175 </label>
     177    <label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
     178</div>
    176179<?php endforeach; ?>
    177180</td>
     
    304307        <?php if ( $is_profile_page ): ?>
    305308        <p><strong><?php _e('Password Strength:'); ?></strong></p>
    306         <div id="pass-strength-result"><?php _e('Too short'); ?></div> <?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&( in your password.'); ?>
     309        <div id="pass-strength-result"><?php _e('Too short'); ?></div> <?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&amp;( in your password.'); ?>
    307310        <?php endif; ?>
    308311    </td>
  • trunk/wp-admin/wp-admin.css

    r7287 r7291  
    815815}
    816816
    817 .form-table label.color-option {
     817.form-table div.color-option {
    818818    display: block;
    819819    clear: both;
Note: See TracChangeset for help on using the changeset viewer.