Bring Comment Save postbox up to parity with Post/Page Publish postbox

git-svn-id: http://svn.automattic.com/wordpress/trunk@9430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2008-10-31 06:53:55 +00:00
parent 8be1ba6191
commit 3a230bff18
5 changed files with 55 additions and 41 deletions

View File

@ -29,6 +29,18 @@ div.dashboard-widget,
border-color: #ccc;
}
#poststuff .inside .spam {
color: red;
}
#poststuff .inside .waiting {
color: orange;
}
#poststuff .inside .approved {
color: green;
}
.widefat {
border-color: #dfdfdf;
}

View File

@ -33,40 +33,46 @@ $url = attribute_escape( $comment->comment_author_url );
<div id="side-info-column" class="inner-sidebar">
<div id="submitdiv" class="stuffbox" >
<h3><span class='hndle'>Save</span></h3>
<div class="inside">
<div class="submitbox" id="submitcomment">
<div class="inside-submitbox">
<div class="insidebox">
<div id='comment-status-radio'>
<p><strong><?php _e('This comment is') ?></strong></p>
<label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label><br />
<label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Awaiting Moderation') ?></label><br />
<label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _e('Spam') ?></label>
<div id="minor-publishing">
<div id="misc-publishing-actions">
<div id="misc-pub-block-1">
<div class="misc-pub-section" id="comment-status-radio">
<p><?php _e('Status:') ?></p>
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label><br />
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Awaiting Moderation') ?></label><br />
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _e('Spam') ?></label>
</div>
</div>
<div class="insidebox" id="deletebutton">
<div id="misc-pub-block-2">
<div class="misc-pub-section curtime misc-pub-section-2-last">
<?php
echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->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 comment') . "</a>"; ?>
</div>
<?php
$stamp = __('%1$s at %2$s');
$date = mysql2date(get_option('date_format'), $comment->comment_date);
$time = mysql2date(get_option('time_format'), $comment->comment_date);
$datef = _c( 'M j, Y \a\t G:i|Publish box date format');
$stamp = __('Submitted on:<br />%1$s');
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
?>
<div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div>
<span id="timestamp"><?php printf($stamp, $date); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
</div>
<p class="submit">
<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
</div>
</div> <!-- misc actions -->
<div id="minor-publishing-actions">
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
</p>
</div>
<div class="clear"></div>
</div>
<div id="major-publishing-actions">
<div id="delete-action">
<a class='submitdelete deletion' href='"<?php echo wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->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'); ?></a>
</div>
<div id="publishing-action">
<input type="submit" name="save" value="<?php _e('Update Comment'); ?>" tabindex="4" class="button-primary" />
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>

View File

@ -35,6 +35,7 @@ jQuery(document).ready( function($) {
$('#timestampdiv').slideUp("normal");
$('.edit-timestamp').show();
$('#timestamp').html(
commentL10n.submittedOn + '<br />' +
$( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' +
$('#jj').val() + ', ' +
$('#aa').val() + ' @ ' +

View File

@ -213,14 +213,10 @@ table#availablethemes td.bottom {
min-height: 70px;
}
#side-sortables #misc-publishing-actions {
#side-info-column #misc-publishing-actions {
max-width: 170px;
}
#side-sortable #minor-publishing-actions {
max-width: 108px;
}
.misc-pub-section {
padding: 6px;
border-bottom: 1px solid #ddd;
@ -230,22 +226,22 @@ table#availablethemes td.bottom {
min-height: 18px;
}
#normal-sortables .misc-pub-section-1-last,
#post-body .misc-pub-section-1-last,
.misc-pub-section-2-last {
border-bottom: 0;
}
#normal-sortables #misc-pub-block-1,
#normal-sortables #misc-pub-block-2 {
#post-body #misc-pub-block-1,
#post-body #misc-pub-block-2 {
float: left;
min-height: 70px;
}
#normal-sortables #misc-pub-block-1 {
#post-body #misc-pub-block-1 {
border-right: 1px solid #ddd;
}
#normal-sortables #misc-pub-block-2 {
#post-body #misc-pub-block-2 {
border-left: 1px solid #ddd;
margin-left: -1px;
}
@ -290,13 +286,11 @@ table#availablethemes td.bottom {
vertical-align: middle;
text-align: left;
float: left;
width: 30%;
}
#publishing-action {
text-align: right;
float: right;
width: 70%;
}
.side-info {

View File

@ -211,10 +211,11 @@ function wp_default_scripts( &$scripts ) {
'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'), '20080219' );
$scripts->add( 'comment', '/wp-admin/js/comment.js', array('jquery'), '20081030' );
$scripts->localize( 'comment', 'commentL10n', array(
'cancel' => __('Cancel'),
'edit' => __('Edit'),
'submittedOn' => __('Submitted on:')
) );
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080709' );
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081016' );
@ -327,14 +328,14 @@ 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(), '20081030' );
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081030b' );
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
$styles->add( 'ie', '/wp-admin/css/ie.css' );
$styles->add_data( 'ie', 'conditional', 'gte IE 6' );
$styles->add( 'colors', true ); // Register "meta" stylesheet for admin colors
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081028'); // for login.php. Is there a better way?
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081030'); // for login.php. Is there a better way?
$styles->add_data( 'colors-fresh', 'rtl', true );
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20081030' );