Dashboard Styling, props mdawaffe, fixes #8070
git-svn-id: http://svn.automattic.com/wordpress/trunk@9536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9084c254d7
commit
4f47d7e869
|
@ -148,7 +148,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #101010;
|
||||
}
|
||||
|
||||
.alternate {
|
||||
.alternate, .alt {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #d54e21;
|
||||
}
|
||||
|
||||
.howto, .nonessential, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
|
||||
.howto, .nonessential, #edit-slug-box, .form-input-tip, .rss-widget span.rss-date, .subsubsub {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #101010;
|
||||
}
|
||||
|
||||
.alternate {
|
||||
.alternate, .alt {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #d54e21;
|
||||
}
|
||||
|
||||
.howto, .nonessential, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
|
||||
.howto, .nonessential, #edit-slug-box, .form-input-tip, .rss-widget span.rss-date, .subsubsub {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,13 +38,6 @@ form .textarea-wrap textarea {
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
form p.field-tip {
|
||||
font-size: .9em;
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dashboard-widgets .postbox form .submit {
|
||||
float: none;
|
||||
margin: .5em 0 0;
|
||||
|
@ -77,12 +70,12 @@ div.postbox div.inside {
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.view-all {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
#dashboard-widgets a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#dashboard-widgets h3 a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#dashboard-widgets h4 {
|
||||
|
@ -130,10 +123,6 @@ div.postbox div.inside {
|
|||
border-top: none;
|
||||
}
|
||||
|
||||
#dashboard_right_now a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#dashboard_right_now .b, #dashboard_right_now .b a {
|
||||
color: #2583ad;
|
||||
}
|
||||
|
@ -199,17 +188,46 @@ div.postbox div.inside {
|
|||
|
||||
/* Recent Comments */
|
||||
|
||||
#dashboard_recent_comments h3 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#the-comment-list {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item {
|
||||
padding: 5px 5px 5px 47px;
|
||||
padding: 1em 10px 1em 70px;
|
||||
border-top: 1px solid;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item, #the-comment-list #replyrow {
|
||||
margin: 0 -10px;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item .avatar {
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item h4 {
|
||||
line-height: 1.4;
|
||||
margin-top: -.2em;
|
||||
font-weight: normal;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item h4 cite, #the-comment-list .comment-item h4 strong {
|
||||
font-style: normal;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item p.comment-author {
|
||||
margin: 0.2em 0;
|
||||
}
|
||||
|
||||
#the-comment-list .comment-item blockquote, #the-comment-list .comment-item blockquote p {
|
||||
|
@ -227,18 +245,73 @@ div.postbox div.inside {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
#the-comment-list .approve a {
|
||||
color: green;
|
||||
}
|
||||
|
||||
#the-comment-list .unapprove a {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#the-comment-list .delete a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* QuickPress */
|
||||
|
||||
#quick-press #add-media-button {
|
||||
margin: .5em 0;
|
||||
}
|
||||
|
||||
#quick-press #content-label {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#quick-press .textarea-wrap {
|
||||
#dashboard_quick_press h4 {
|
||||
float: left;
|
||||
width: 5em;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-family: Georgia, serif;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#dashboard_quick_press h4 label {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#dashboard_quick_press .input-text-wrap, #dashboard_quick_press .textarea-wrap {
|
||||
margin: 0 0 1em 5em;
|
||||
}
|
||||
|
||||
#dashboard_quick_press #media-buttons {
|
||||
margin: 0 0 .5em 5em;
|
||||
padding: 0 0 0 2px;
|
||||
}
|
||||
|
||||
#dashboard-widgets #dashboard_quick_press form p.submit {
|
||||
border-top: 1px solid;
|
||||
padding: 1em 1em 1em 5em;
|
||||
margin: 0 -10px -10px;
|
||||
}
|
||||
|
||||
#dashboard-widgets #dashboard_quick_press form p.submit input {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#dashboard-widgets #dashboard_quick_press form p.submit #save-post {
|
||||
margin: 0 1em 0 10px;
|
||||
}
|
||||
|
||||
#dashboard-widgets #dashboard_quick_press form p.submit .cancel {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
text-decoration: underline;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#dashboard-widgets #dashboard_quick_press form p.submit .cancel:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
#dashboard-widgets #dashboard_quick_press form p.submit #publish {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Recent Drafts */
|
||||
|
@ -248,6 +321,24 @@ div.postbox div.inside {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
#dashboard_recent_drafts ul li {
|
||||
margin-bottom: 0.6em;
|
||||
}
|
||||
|
||||
#dashboard_recent_drafts h4 {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#dashboard_recent_drafts h4 abbr {
|
||||
font-family: Georgia, serif;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#dashboard_recent_drafts p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Feeds */
|
||||
|
||||
.rss-widget ul {
|
||||
|
@ -256,9 +347,8 @@ div.postbox div.inside {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
.rss-widget a.rsswidget,
|
||||
.rss-widget span.rss-date {
|
||||
font-size: 14px;
|
||||
font-family: Georgia, serif;
|
||||
}
|
||||
|
||||
.rss-widget cite {
|
||||
|
|
|
@ -28,7 +28,7 @@ function wp_dashboard_setup() {
|
|||
wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' );
|
||||
|
||||
// Recent Comments Widget
|
||||
wp_add_dashboard_widget( 'dashboard_recent_comments', __( 'Recent Comments' ), 'wp_dashboard_recent_comments' );
|
||||
wp_add_dashboard_widget( 'dashboard_recent_comments', sprintf( __( 'Recent Comments <a href="%s">View all</a>' ), 'edit-comments.php' ), 'wp_dashboard_recent_comments' );
|
||||
|
||||
// Incoming Links Widget
|
||||
if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) {
|
||||
|
@ -51,7 +51,7 @@ function wp_dashboard_setup() {
|
|||
wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' );
|
||||
|
||||
// Recent Drafts
|
||||
wp_add_dashboard_widget( 'dashboard_recent_drafts', __( 'Recent Drafts' ), 'wp_dashboard_recent_drafts' );
|
||||
wp_add_dashboard_widget( 'dashboard_recent_drafts', sprintf( __( 'Recent Drafts <a href="%s">View all</a>' ), 'edit.php?post_status=draft' ), 'wp_dashboard_recent_drafts' );
|
||||
|
||||
|
||||
// Primary feed (Dev Blog) Widget
|
||||
|
@ -311,11 +311,11 @@ function wp_dashboard_quick_press() {
|
|||
<input type="text" name="post_title" id="title" autocomplete="off" value="<?php echo attribute_escape( $post->post_title ); ?>" />
|
||||
</div>
|
||||
|
||||
<div id="add-media-button" class="alignright">
|
||||
<a class="thickbox button" href="<?php echo clean_url( admin_url('media-upload.php?TB_iframe=true') ) ?>" id="add-media-link"><?php _e( 'Insert Media' ); ?></a>
|
||||
<div id="media-buttons" class="hide-if-no-js">
|
||||
<?php do_action( 'media_buttons' ); ?>
|
||||
</div>
|
||||
|
||||
<h4 id="content-label"><label for="content"><?php _e('Post') ?></label></h4>
|
||||
<h4 id="content-label"><label for="content"><?php _e('Content') ?></label></h4>
|
||||
<div class="textarea-wrap">
|
||||
<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea>
|
||||
</div>
|
||||
|
@ -324,14 +324,14 @@ function wp_dashboard_quick_press() {
|
|||
<div class="input-text-wrap">
|
||||
<input type="text" name="tags_input" id="tags-input" value="<?php echo get_tags_to_edit( $post->ID ); ?>" />
|
||||
</div>
|
||||
<p class='field-tip'><?php _e('Separate tags with commas'); ?></p>
|
||||
|
||||
<p class="submit">
|
||||
<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
|
||||
<input type="hidden" name="quickpress_post_ID" value="<?php echo (int) $post->ID; ?>" />
|
||||
<?php wp_nonce_field('add-post'); ?>
|
||||
<input type="submit" name="save" id="save-post" class="button alignleft" value="<?php _e('Save Draft'); ?>" />
|
||||
<input type="submit" name="publish" id="publish" accesskey="p" class="button button-highlighted alignright" value="<?php _e('Publish'); ?>" />
|
||||
<input type="submit" name="save" id="save-post" class="button" value="<?php _e('Save Draft'); ?>" />
|
||||
<input type="reset" value="<?php _e( 'Cancel' ); ?>" class="cancel" />
|
||||
<input type="submit" name="publish" id="publish" accesskey="p" class="button button-highlighted" value="<?php _e('Publish'); ?>" />
|
||||
<br class="clear" />
|
||||
</p>
|
||||
|
||||
|
@ -362,7 +362,10 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
|
|||
foreach ( $drafts as $draft ) {
|
||||
$url = get_edit_post_link( $draft->ID );
|
||||
$title = _draft_or_post_title( $draft->ID );
|
||||
$list[] = '<abbr title="' . get_the_time(__('Y/m/d g:i:s A'), $draft) . '">' . get_the_time( get_option( 'date_format' ), $draft ) . "</abbr> <a href='$url' title='" . sprintf( __( 'Edit "%s"' ), attribute_escape( $title ) ) . "'>$title</a>";
|
||||
$item = "<h4><a href='$url' title='" . sprintf( __( 'Edit "%s"' ), attribute_escape( $title ) ) . "'>$title</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>';
|
||||
if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) )
|
||||
$item .= '<p>' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '</p>';
|
||||
$list[] = $item;
|
||||
}
|
||||
?>
|
||||
<ul>
|
||||
|
@ -387,7 +390,6 @@ function wp_dashboard_recent_comments() {
|
|||
?>
|
||||
|
||||
<div id="the-comment-list" class="list:comment">
|
||||
<p class="view-all"><a href="edit-comments.php"><?php _e( 'View All Comments' ); ?></a></p>
|
||||
<?php
|
||||
foreach ( $comments as $comment )
|
||||
_wp_dashboard_recent_comments_row( $comment );
|
||||
|
@ -408,26 +410,8 @@ function wp_dashboard_recent_comments() {
|
|||
}
|
||||
|
||||
function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
||||
static $date = false;
|
||||
static $today = false;
|
||||
static $yesterday = false;
|
||||
|
||||
$GLOBALS['comment'] =& $comment;
|
||||
|
||||
if ( $show_date ) {
|
||||
if ( !$today )
|
||||
$today = gmdate( get_option( 'date_format' ), time() + get_option( 'gmt_offset' ) );
|
||||
if ( !$yesterday )
|
||||
$yesterday = gmdate( get_option( 'date_format' ), strtotime( 'yesterday' ) + get_option( 'gmt_offset' ) );
|
||||
$wordy_dates = array( $today => __( 'Today' ), $yesterday => __( 'Yesterday' ) );
|
||||
|
||||
$comment_date = gmdate( get_option( 'date_format' ), strtotime( $comment->comment_date ) + get_option( 'gmt_offset' ) );
|
||||
if ( $comment_date != $date ) {
|
||||
$date = $comment_date;
|
||||
echo '<h4>' . ( isset( $wordy_dates[$date] ) ? $wordy_dates[$date] : $date ) . ":</h4>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$comment_post_url = get_edit_post_link( $comment->comment_post_ID );
|
||||
$comment_post_title = get_the_title( $comment->comment_post_ID );
|
||||
$comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>";
|
||||
|
@ -444,10 +428,10 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
|
||||
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
|
||||
$actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>';
|
||||
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
|
||||
$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>';
|
||||
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>';
|
||||
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
|
||||
|
||||
$actions = apply_filters( 'comment_row_actions', $actions, $comment );
|
||||
|
||||
|
@ -458,10 +442,8 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||
( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
|
||||
|
||||
// Reply and quickedit need a hide-if-no-js span
|
||||
if ( 'reply' == $action )
|
||||
if ( 'reply' == $action || 'quickedit' == $action )
|
||||
$action .= ' hide-if-no-js';
|
||||
elseif ( 'quickedit' == $action )
|
||||
$action .= ' hide-if-no-js hide-if-js'; // hah
|
||||
|
||||
$actions_string .= "<span class='$action'>$sep$link</span>";
|
||||
}
|
||||
|
@ -472,8 +454,8 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||
<div id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status($comment->comment_ID) ) ); ?>>
|
||||
<?php if ( !$comment->comment_type || 'comment' == $comment->comment_type ) : ?>
|
||||
|
||||
<?php echo get_avatar( $comment, 32 ); ?>
|
||||
<span class="comment-meta"><?php printf( __( '%1$s in response to %2$s:' ), '<cite>' . get_comment_author() . '</cite>', $comment_post_link ); ?></span>
|
||||
<?php echo get_avatar( $comment, 50 ); ?>
|
||||
<h4 class="comment-meta"><?php printf( __( 'From %1$s on %2$s%3$s' ), '<cite class="comment-author">' . get_comment_author_link() . '</cite>', $comment_post_link, ' <span class="approve">' . __( '[Awaiting Moderation]' ) . '</span>' ); ?></h4>
|
||||
|
||||
<?php
|
||||
else :
|
||||
|
@ -490,7 +472,8 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||
$type = wp_specialchars( $type );
|
||||
?>
|
||||
|
||||
<span class="comment-meta"><?php printf( __( '%3$s on %2$s: %1$s' ), '<cite>' . get_comment_author() . '</cite>', $comment_post_link, "<strong>$type</strong>" ); ?></span>
|
||||
<h4 class="comment-meta"><?php printf( __( '%1$s on %2$s' ), "<strong>$type</strong>", $comment_post_link ); ?></h4>
|
||||
<p class="comment-author"><?php comment_author_link(); ?></p>
|
||||
|
||||
<?php endif; // comment_type ?>
|
||||
<blockquote><p><?php comment_excerpt(); ?></p></blockquote>
|
||||
|
|
|
@ -1655,18 +1655,18 @@ table.form-table td .updated {
|
|||
/*font-weight: bold;*/
|
||||
}
|
||||
|
||||
#poststuff #media-buttons {
|
||||
#media-buttons {
|
||||
cursor: default;
|
||||
padding: 8px 8px 0;
|
||||
}
|
||||
|
||||
#poststuff #media-buttons a {
|
||||
#media-buttons a {
|
||||
cursor: pointer;
|
||||
padding: 0 0 5px 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#poststuff #media-buttons img {
|
||||
#media-buttons img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
|
|
@ -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(), '20081103' );
|
||||
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081105' );
|
||||
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
|
||||
|
||||
$styles->add( 'ie', '/wp-admin/css/ie.css' );
|
||||
|
@ -341,7 +341,7 @@ function wp_default_styles( &$styles ) {
|
|||
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20081030' );
|
||||
$styles->add( 'media', '/wp-admin/css/media.css', array(), '20080709' );
|
||||
$styles->add( 'widgets', '/wp-admin/css/widgets.css' );
|
||||
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081030' );
|
||||
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081105' );
|
||||
$styles->add( 'install', '/wp-admin/css/install.css', array(), '20080708' );
|
||||
$styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' );
|
||||
$styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080922' );
|
||||
|
|
Loading…
Reference in New Issue