From 2085ea1c9a7798400e7d8ca0f241d7f8e56af434 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 14 Mar 2008 08:17:59 +0000 Subject: [PATCH] Date display and editing tweaks. git-svn-id: http://svn.automattic.com/wordpress/trunk@7285 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/colors-fresh.css | 6 +++++- wp-admin/css/global.css | 4 ++++ wp-admin/edit-form-advanced.php | 8 ++++---- wp-admin/edit-form-comment.php | 4 ++-- wp-admin/edit-page-form.php | 8 ++++---- wp-admin/images/date-button.gif | Bin 0 -> 111 bytes wp-admin/includes/template.php | 10 +++++----- wp-admin/js/comment.js | 1 - wp-admin/js/page.js | 1 - wp-admin/js/post.js | 1 - wp-admin/wp-admin.css | 7 +++++++ 11 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 wp-admin/images/date-button.gif diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 62e5d8afe3..823ba4605b 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -484,7 +484,7 @@ input.readonly { border-top-color: #247fab; } -#user_info, .login #backtoblog a { +#user_info, .login #backtoblog a, .curtime { color: #ccc; } @@ -675,3 +675,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover #poststuff #titlewrap { border-color: #ccc; } + +.curtime { + color: #666; +} \ No newline at end of file diff --git a/wp-admin/css/global.css b/wp-admin/css/global.css index 8307dfc695..5bd9e2fcc8 100644 --- a/wp-admin/css/global.css +++ b/wp-admin/css/global.css @@ -120,3 +120,7 @@ textarea, input, select { padding: 0; padding-bottom: 7px; } + +#timestampdiv { + display: none; +} \ No newline at end of file diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 83ff542866..b8c9b3d882 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -112,7 +112,7 @@ if ($post_ID) { if ( 'future' == $post->post_status ) { $stamp = __('Scheduled for:
%1$s at %2$s'); } else if ( 'publish' == $post->post_status ) { - $stamp = __('Published on:
%1$s at %2$s'); + $stamp = __('%1$s at %2$s'); } else { $stamp = __('Saved on:
%1$s at %2$s'); } @@ -120,12 +120,12 @@ if ($post_ID) { $date = mysql2date(get_option('date_format'), $post->post_date); $time = mysql2date(get_option('time_format'), $post->post_date); } else { - $stamp = __('Timestamp:
%1$s at %2$s'); + $stamp = __('%1$s at %2$s'); $date = mysql2date(get_option('date_format'), current_time('mysql')); $time = mysql2date(get_option('time_format'), current_time('mysql')); } ?> -

+

 

@@ -177,7 +177,7 @@ if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )

- +
ID); ?> diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 48a0fb2a1f..0cc4915b43 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -39,11 +39,11 @@ addLoadEvent(focusit);

%1$s at %2$s'); +$stamp = __('%1$s at %2$s'); $date = mysql2date(get_option('date_format'), $comment->comment_date); $time = mysql2date(get_option('time_format'), $comment->comment_date); ?> -

+

 

diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 6eb2bd65c4..321a463554 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -90,7 +90,7 @@ if ($post_ID) { if ( 'future' == $post->post_status ) { $stamp = __('Scheduled for:
%1$s at %2$s'); } else if ( 'publish' == $post->post_status ) { - $stamp = __('Published on:
%1$s at %2$s'); + $stamp = __('%1$s at %2$s'); } else { $stamp = __('Saved on:
%1$s at %2$s'); } @@ -98,12 +98,12 @@ if ($post_ID) { $date = mysql2date(get_option('date_format'), $post->post_date); $time = mysql2date(get_option('time_format'), $post->post_date); } else { - $stamp = __('Timestamp:
%1$s at %2$s'); + $stamp = __('%1$s at %2$s'); $date = mysql2date(get_option('date_format'), current_time('mysql')); $time = mysql2date(get_option('time_format'), current_time('mysql')); } ?> -

+

 

@@ -152,7 +152,7 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )

- +
ID); ?> diff --git a/wp-admin/images/date-button.gif b/wp-admin/images/date-button.gif new file mode 100644 index 0000000000000000000000000000000000000000..7ee32cb5155cf713da9eaf58a701fddd0030777b GIT binary patch literal 111 zcmZ?wbhEHb64+e@qSr{1@*co&ffB>YH zf!U-&Yr*a19*Wvi8wD0xt55n?8Fgds+|GHE9`4(4QR?u6YwvybZ(IG{I{snX>aQgm NV^UA*s4y^C0{~v 0 ) $tab_index_attribute = " tabindex=\"$tab_index\""; - echo ' '; + echo '
'; $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); $post_date = ($for_post) ? $post->post_date : $comment->comment_date; @@ -825,10 +825,10 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { } $month .= ''; - $day = ''; - $year = ''; - $hour = ''; - $minute = ''; + $day = ''; + $year = ''; + $hour = ''; + $minute = ''; printf(__('%1$s%2$s%3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute); ?> diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js index 839e8f2965..bde9b97fee 100644 --- a/wp-admin/js/comment.js +++ b/wp-admin/js/comment.js @@ -1,7 +1,6 @@ addLoadEvent( function() { add_postbox_toggles('comment'); - jQuery('#timestampdiv').css('display', 'none'); jQuery('.edit-timestamp').click(function () { if (jQuery('#timestampdiv').is(":hidden")) { jQuery('#timestampdiv').slideDown("normal"); diff --git a/wp-admin/js/page.js b/wp-admin/js/page.js index 7b073582e0..02fd70858b 100644 --- a/wp-admin/js/page.js +++ b/wp-admin/js/page.js @@ -5,7 +5,6 @@ addLoadEvent( function() { // hide advanced slug field jQuery('#pageslugdiv').hide(); - jQuery('#timestampdiv').css('display', 'none'); jQuery('.edit-timestamp').click(function () { if (jQuery('#timestampdiv').is(":hidden")) { jQuery('#timestampdiv').slideDown("normal"); diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index f69e0349ad..9aeafcc19d 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -146,7 +146,6 @@ addLoadEvent( function() { } ); jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); - jQuery('#timestampdiv').css('display', 'none'); jQuery('.edit-timestamp').click(function () { if (jQuery('#timestampdiv').is(":hidden")) { jQuery('#timestampdiv').slideDown("normal"); diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 6789b93b81..1952cb50ac 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -1340,4 +1340,11 @@ ul.view-switch li.current { #templateside ul li a { text-decoration: none; +} + +.curtime { + background-image: url(images/date-button.gif); + background-repeat: no-repeat; + background-position: left 2px; + padding-left: 18px; } \ No newline at end of file