From ef37aa39aacaecd308228b519592b6f2eaff29ef Mon Sep 17 00:00:00 2001 From: markjaquith Date: Mon, 3 Nov 2008 07:06:36 +0000 Subject: [PATCH] Update to publish box styles. More horizontal room, consistent button placement, better for i18n, better wording. git-svn-id: http://svn.automattic.com/wordpress/trunk@9491 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 122 +++++++++++++++++--------------- wp-admin/edit-form-comment.php | 24 ++++--- wp-admin/edit-page-form.php | 120 ++++++++++++++++--------------- wp-admin/includes/template.php | 2 +- wp-admin/js/comment.js | 4 +- wp-admin/js/page.js | 4 +- wp-admin/js/post.js | 4 +- wp-admin/wp-admin.css | 70 +++++++++--------- wp-includes/script-loader.php | 12 ++-- 9 files changed, 184 insertions(+), 178 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 2aeec0815..849d95c12 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -71,54 +71,45 @@ function post_submit_meta_box($post) {
-
-
- -
ID), true); ?> tabindex="4" />
+
+
+
-
-ID ) { - if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date - $stamp = __('Scheduled for:
%1$s'); - } else if ( 'publish' == $post->post_status ) { // already published - $stamp = __('Published on:
%1$s'); - } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified - $stamp = __('Publish immediately'); - } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified - $stamp = __('Schedule for:
%1$s'); - } else { // draft, 1 or more saves, date specified - $stamp = __('Publish on:
%1$s'); - } - $date = date_i18n( $datef, strtotime( $post->post_date ) ); -} else { // draft (no saves, and thus no date specified) - $stamp = __('Publish immediately'); - $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); -} -?> - -
- - -   -
-
- + -
+
post_status ) { @@ -152,34 +143,49 @@ switch ( $post->post_status ) { post_status, 'pending' ); ?> value='pending'> post_status, 'draft' ); ?> value='draft'> -
- - + +
-
-
-
+
-
-post_status && 'private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> - -post_status && $can_publish ) { ?> - + +
+ID), true); ?> tabindex="4" /> +
- - - +ID ) { + if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + $stamp = __('Scheduled for: %1$s'); + } else if ( 'publish' == $post->post_status ) { // already published + $stamp = __('Published on: %1$s'); + } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified + $stamp = __('Publish immediately'); + } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + $stamp = __('Schedule for: %1$s'); + } else { // draft, 1 or more saves, date specified + $stamp = __('Publish on: %1$s'); + } + $date = date_i18n( $datef, strtotime( $post->post_date ) ); +} else { // draft (no saves, and thus no date specified) + $stamp = __('Publish immediately'); + $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); +} +?> + +
+ + +   +
+
+
diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index d85c0e24b..bb03ec221 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -36,31 +36,35 @@ $url = attribute_escape( $comment->comment_author_url );
+ +
+
+ +
+
+
+
-
+


-
-
-
+ +
%1$s'); +$datef = _c( 'M j, Y @ G:i|Publish box date format'); +$stamp = __('Submitted on: %1$s'); $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); ?>  
-
-
- -
+
comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete'); ?> diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 7d783afda..83ec60766 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -64,51 +64,45 @@ function page_submit_meta_box($post) {
-
-
- -
-
-ID ) { - if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date - $stamp = __('Scheduled for:
%1$s'); - } else if ( 'publish' == $post->post_status ) { // already published - $stamp = __('Published on:
%1$s'); - } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified - $stamp = __('Publish immediately'); - } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified - $stamp = __('Schedule for:
%1$s'); - } else { // draft, 1 or more saves, date specified - $stamp = __('Publish on:
%1$s'); - } - $date = date_i18n( $datef, strtotime( $post->post_date ) ); -} else { // draft (no saves, and thus no date specified) - $stamp = __('Publish immediately'); - $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); -} -?> - -
- - -   -
-
- + -
+
post_status ) { @@ -142,34 +136,42 @@ switch ( $post->post_status ) { post_status, 'pending' ); ?> value='pending'> post_status, 'draft' ); ?> value='draft'> -
- - + + +
-
-
-
+
-
- -post_status && 'private' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> - -post_status && $can_publish ) { ?> - - - - - - - +ID ) { + if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + $stamp = __('Scheduled for: %1$s'); + } else if ( 'publish' == $post->post_status ) { // already published + $stamp = __('Published on: %1$s'); + } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified + $stamp = __('Publish immediately'); + } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + $stamp = __('Schedule for: %1$s'); + } else { // draft, 1 or more saves, date specified + $stamp = __('Publish on: %1$s'); + } + $date = date_i18n( $datef, strtotime( $post->post_date ) ); +} else { // draft (no saves, and thus no date specified) + $stamp = __('Publish immediately'); + $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); +} +?> + +
+ + +   +
+
+
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index b6aaa1766..fa0196e88 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2260,7 +2260,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { $year = ''; $hour = ''; $minute = ''; - printf(_c('%1$s%2$s, %3$s
@ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); + printf(_c('%1$s%2$s, %3$s @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); if ( $multi ) return; diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js index 70ffee093..9b870da08 100644 --- a/wp-admin/js/comment.js +++ b/wp-admin/js/comment.js @@ -35,12 +35,12 @@ jQuery(document).ready( function($) { $('#timestampdiv').slideUp("normal"); $('.edit-timestamp').show(); $('#timestamp').html( - commentL10n.submittedOn + '
' + + commentL10n.submittedOn + ' ' + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + $('#jj').val() + ', ' + $('#aa').val() + ' @ ' + $('#hh').val() + ':' + - $('#mn').val() + ' ' + $('#mn').val() + ' ' ); return false; diff --git a/wp-admin/js/page.js b/wp-admin/js/page.js index d1e217103..efa995a0c 100644 --- a/wp-admin/js/page.js +++ b/wp-admin/js/page.js @@ -60,12 +60,12 @@ jQuery(document).ready( function($) { $('#publish').val( postL10n.update ); } $('#timestamp').html( - publishOn + '
' + + publishOn + ' ' + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + $('#jj').val() + ', ' + $('#aa').val() + ' @ ' + $('#hh').val() + ':' + - $('#mn').val() + ' ' + $('#mn').val() + ' ' ); return false; diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 3bdbffec8..b13dbf384 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -204,12 +204,12 @@ jQuery(document).ready( function($) { $('#publish').val( postL10n.update ); } $('#timestamp').html( - publishOn + '
' + + publishOn + ' ' + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + $('#jj').val() + ', ' + $('#aa').val() + ' @ ' + $('#hh').val() + ':' + - $('#mn').val() + ' ' + $('#mn').val() + ' ' ); return false; diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 164281137..097bea569 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -207,67 +207,41 @@ table#availablethemes td.bottom { border-bottom-width: 1px; } -#misc-publishing-actions { - float: left; - border-right: 1px solid #ddd; - min-height: 70px; +#submitdiv h3, #pagesubmitdiv h3 { + margin-bottom: 0 !important; } -#side-info-column #misc-publishing-actions { - max-width: 170px; +#misc-publishing-actions { + padding: 6px 0 16px 0; } .misc-pub-section { padding: 6px; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid #eee; } -#normal-sortables .misc-pub-section { - min-height: 18px; -} - -#post-body .misc-pub-section-1-last, -.misc-pub-section-2-last { +.misc-pub-section-last { border-bottom: 0; } -#post-body #misc-pub-block-1, -#post-body #misc-pub-block-2 { - float: left; - min-height: 70px; -} - -#post-body #misc-pub-block-1 { - border-right: 1px solid #ddd; -} - -#post-body #misc-pub-block-2 { - border-left: 1px solid #ddd; - margin-left: -1px; -} - #minor-publishing-actions { - padding: 6px 6px 6px 0; - float: right; + padding: 6px; text-align: right; } +#minor-publishing { + border-bottom: 1px solid #ddd; +} + #save-post { float: right; - margin-bottom: 10px; } .preview { - float: right; - clear: right; + float: left; padding: 2px 8px !important; } -#minor-publishing { - margin-top: -10px; - border-bottom: 1px solid #ddd; -} - #major-publishing-actions { background: #eaf2fa; padding: 6px; @@ -293,6 +267,26 @@ table#availablethemes td.bottom { float: right; } +#post-body #minor-publishing { + padding-bottom: 10px; +} + +#post-body #misc-publishing-actions { + padding: 0; +} + +#post-body .misc-pub-section { + border-right: 1px solid #eee; + border-bottom: 0; + min-height: 30px; + float: left; + max-width: 32%; +} + +#post-body .misc-pub-section-last { + border-right: 0; +} + .side-info { margin: 0; padding: 4px; diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 7a293fed8..f9ea08c1d 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -176,7 +176,7 @@ function wp_default_scripts( &$scripts ) { 'save' => __('Save'), 'cancel' => __('Cancel'), ) ); - $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug', 'settings-box'), '20081102' ); + $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug', 'settings-box'), '20081103' ); $scripts->localize( 'post', 'postL10n', array( 'tagsUsed' => __('Tags used on this post:'), 'add' => attribute_escape(__('Add')), @@ -192,10 +192,10 @@ function wp_default_scripts( &$scripts ) { 'publish' => __('Publish'), 'schedule' => __('Schedule'), 'update' => __('Update Post'), - 'savePending' => __('Save Pending'), + 'savePending' => __('Save as Pending'), 'saveDraft' => __('Save Draft') ) ); - $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox', 'settings-box'), '20081102' ); + $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox', 'settings-box'), '20081103' ); $scripts->localize( 'page', 'postL10n', array( 'cancel' => __('Cancel'), 'edit' => __('Edit'), @@ -207,11 +207,11 @@ function wp_default_scripts( &$scripts ) { 'publish' => __('Publish'), 'schedule' => __('Schedule'), 'update' => __('Update Page'), - 'savePending' => __('Save Pending'), + 'savePending' => __('Save as Pending'), 'saveDraft' => __('Save Draft') ) ); $scripts->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox', 'settings-box'), '20080925' ); - $scripts->add( 'comment', '/wp-admin/js/comment.js', array('jquery'), '20081030' ); + $scripts->add( 'comment', '/wp-admin/js/comment.js', array('jquery'), '20081103' ); $scripts->localize( 'comment', 'commentL10n', array( 'cancel' => __('Cancel'), 'edit' => __('Edit'), @@ -328,7 +328,7 @@ function wp_default_styles( &$styles ) { $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' ); - $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081031' ); + $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081103' ); $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' ); $styles->add( 'ie', '/wp-admin/css/ie.css' );