Make WordPress Core

Changeset 17754


Ignore:
Timestamp:
04/28/2011 07:01:51 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Eleven: theme options - see #17198

  • Make color swatch clickable to open palette
  • Change color picker link to a submit button to match existing UI
Location:
trunk/wp-content/themes/twentyeleven/inc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.css

    r17737 r17754  
    2222}
    2323#link-color-example {
    24     padding: 4px 14px;
    25     margin: 0 7px 0 3px;
    2624    -moz-border-radius: 4px;
    27     -khtml-border-radius: 4px;
    2825    -webkit-border-radius: 4px;
    2926    border-radius: 4px;
    3027    border: 1px solid #dfdfdf;
     28    margin: 0 7px 0 3px;
     29    padding: 4px 14px;
    3130}
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.js

    r17737 r17754  
    66        $('#link-color').val(a);
    77        $('#link-color-example').css('background-color', a);
    8     }
     8    };
    99
    1010    $(document).ready( function() {
     
    1313        pickColor( $('#link-color').val() );
    1414
    15         $('#pickcolor').click( function(e) {
     15        $('.pickcolor').click( function(e) {
    1616            $('#colorPickerDiv').show();
    1717            e.preventDefault();
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.php

    r17740 r17754  
    193193                        <fieldset><legend class="screen-reader-text"><span><?php _e( 'Link Color', 'twentyeleven' ); ?></span></legend>
    194194                            <input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" />
    195                             <span id="link-color-example"></span> <a class="hide-if-no-js" href="#" id="pickcolor"><?php _e( 'Select a Color', 'twentyeleven' ); ?></a>
     195                            <a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>
     196                            <input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>">
    196197                            <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
    197198                            <br />
     
    284285
    285286    $default_options = twentyeleven_get_default_theme_options();
    286    
     287
    287288    // Don't do anything if the current link color is the default.
    288289    if ( $default_options['link_color'] == $link_color )
Note: See TracChangeset for help on using the changeset viewer.