Make WordPress Core

Changeset 7285


Ignore:
Timestamp:
03/14/2008 08:17:59 AM (18 years ago)
Author:
matt
Message:

Date display and editing tweaks.

Location:
trunk/wp-admin
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r7262 r7285  
    485485}
    486486
    487 #user_info, .login #backtoblog a {
     487#user_info, .login #backtoblog a, .curtime {
    488488    color: #ccc;
    489489}
     
    676676    border-color: #ccc;
    677677}
     678
     679.curtime {
     680    color: #666;
     681}
  • trunk/wp-admin/css/global.css

    r7181 r7285  
    121121    padding-bottom: 7px;
    122122}
     123
     124#timestampdiv {
     125    display: none;
     126}
  • trunk/wp-admin/edit-form-advanced.php

    r7282 r7285  
    113113        $stamp = __('Scheduled for:<br />%1$s at %2$s');
    114114    } else if ( 'publish' == $post->post_status ) {
    115         $stamp = __('Published on:<br />%1$s at %2$s');
     115        $stamp = __('%1$s at %2$s');
    116116    } else {
    117117        $stamp = __('Saved on:<br />%1$s at %2$s');
     
    121121    $time = mysql2date(get_option('time_format'), $post->post_date);
    122122} else {
    123     $stamp = __('Timestamp:<br />%1$s at %2$s');
     123    $stamp = __('%1$s at %2$s');
    124124    $date = mysql2date(get_option('date_format'), current_time('mysql'));
    125125    $time = mysql2date(get_option('time_format'), current_time('mysql'));
    126126}
    127127?>
    128 <p><?php printf($stamp, $date, $time); ?>
     128<p class="curtime"><?php printf($stamp, $date, $time); ?>
    129129&nbsp;<a href="#edit_timestamp" class="edit-timestamp"><?php _e('Edit') ?></a></p>
    130130
     
    178178<h3><?php _e('Title') ?></h3>
    179179<div id="titlewrap">
    180     <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" />
     180    <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
    181181</div>
    182182<div class="inside">
  • trunk/wp-admin/edit-form-comment.php

    r7114 r7285  
    4040
    4141<?php
    42 $stamp = __('Timestamp:<br />%1$s at %2$s');
     42$stamp = __('%1$s at %2$s');
    4343$date = mysql2date(get_option('date_format'), $comment->comment_date);
    4444$time = mysql2date(get_option('time_format'), $comment->comment_date);
    4545?>
    46 <p><?php printf($stamp, $date, $time); ?>
     46<p class="curtime"><?php printf($stamp, $date, $time); ?>
    4747&nbsp;<a href="#edit_timestamp" class="edit-timestamp"><?php _e('Edit') ?></a></p>
    4848
  • trunk/wp-admin/edit-page-form.php

    r7266 r7285  
    9191        $stamp = __('Scheduled for:<br />%1$s at %2$s');
    9292    } else if ( 'publish' == $post->post_status ) {
    93         $stamp = __('Published on:<br />%1$s at %2$s');
     93        $stamp = __('%1$s at %2$s');
    9494    } else {
    9595        $stamp = __('Saved on:<br />%1$s at %2$s');
     
    9999    $time = mysql2date(get_option('time_format'), $post->post_date);
    100100} else {
    101     $stamp = __('Timestamp:<br />%1$s at %2$s');
     101    $stamp = __('%1$s at %2$s');
    102102    $date = mysql2date(get_option('date_format'), current_time('mysql'));
    103103    $time = mysql2date(get_option('time_format'), current_time('mysql'));
    104104}
    105105?>
    106 <p><?php printf($stamp, $date, $time); ?>
     106<p class="curtime"><?php printf($stamp, $date, $time); ?>
    107107&nbsp;<a href="#edit_timestamp" class="edit-timestamp"><?php _e('Edit') ?></a></p>
    108108
     
    153153<h3><?php _e('Title') ?></h3>
    154154<div id="titlewrap">
    155   <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" />
     155  <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" autocomplete="off" />
    156156</div>
    157157<div class="inside">
  • trunk/wp-admin/includes/template.php

    r7279 r7285  
    806806        $tab_index_attribute = " tabindex=\"$tab_index\"";
    807807
    808     echo '<input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label>';
     808    echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
    809809
    810810    $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 );
     
    826826    $month .= '</select>';
    827827
    828     $day = '<input type="text" id="jj" name="jj" value="' . $jj . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
    829     $year = '<input type="text" id="aa" name="aa" value="' . $aa . '" size="4" maxlength="5" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
    830     $hour = '<input type="text" id="hh" name="hh" value="' . $hh . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
    831     $minute = '<input type="text" id="mn" name="mn" value="' . $mn . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' />';
     828    $day = '<input type="text" id="jj" name="jj" value="' . $jj . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off"  />';
     829    $year = '<input type="text" id="aa" name="aa" value="' . $aa . '" size="4" maxlength="5" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off"  />';
     830    $hour = '<input type="text" id="hh" name="hh" value="' . $hh . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off"  />';
     831    $minute = '<input type="text" id="mn" name="mn" value="' . $mn . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off"  />';
    832832    printf(__('%1$s%2$s%3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute);
    833833?>
  • trunk/wp-admin/js/comment.js

    r6975 r7285  
    22    add_postbox_toggles('comment');
    33
    4     jQuery('#timestampdiv').css('display', 'none');
    54    jQuery('.edit-timestamp').click(function () {
    65        if (jQuery('#timestampdiv').is(":hidden")) {
  • trunk/wp-admin/js/page.js

    r6975 r7285  
    66    jQuery('#pageslugdiv').hide();
    77
    8     jQuery('#timestampdiv').css('display', 'none');
    98    jQuery('.edit-timestamp').click(function () {
    109        if (jQuery('#timestampdiv').is(":hidden")) {
  • trunk/wp-admin/js/post.js

    r7143 r7285  
    147147    jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change();
    148148
    149     jQuery('#timestampdiv').css('display', 'none');
    150149    jQuery('.edit-timestamp').click(function () {
    151150        if (jQuery('#timestampdiv').is(":hidden")) {
  • trunk/wp-admin/wp-admin.css

    r7273 r7285  
    13421342    text-decoration: none;
    13431343}
     1344
     1345.curtime {
     1346    background-image: url(images/date-button.gif);
     1347    background-repeat: no-repeat;
     1348    background-position: left 2px;
     1349    padding-left: 18px;
     1350}
Note: See TracChangeset for help on using the changeset viewer.