A number of style tweaks; widen up a little; starting to add contextual help to various forms; catching up unloved forms with new UI guidelines.

git-svn-id: https://develop.svn.wordpress.org/trunk@7181 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2008-03-07 10:05:54 +00:00
parent 0d404a55ed
commit 1a25889bb9
11 changed files with 96 additions and 64 deletions

View File

@ -213,6 +213,16 @@ ul.widget-control-list .sorthelper {
color: #ccc;
}
.submitbox .submitdelete {
border-bottom-color: #999;
}
.submitbox .submitdelete:hover {
color: #fff;
background-color: #f00;
border-bottom-color: #f00;
}
.tablenav .dots {
background-color: #e4f2fd;
border-color: #e4f2fd;
@ -240,7 +250,7 @@ ul.widget-control-list .sorthelper {
border-bottom-color: #2583ad;
}
.widefat td, .widefat th, div#available-widgets-filter, ul#widget-list li.widget-list-item, .commentlist li, .submitbox .submit a:hover {
.widefat td, .widefat th, div#available-widgets-filter, ul#widget-list li.widget-list-item, .commentlist li {
border-bottom-color: #ccc;
}

View File

@ -82,12 +82,33 @@ textarea, input, select {
width: 3%;
}
.wrap {
.wrap, .updated, .error {
margin: 0;
margin-left: 15px;
margin-right: 15px;
padding: 0;
max-width: 960px;
max-width: 980px;
}
.updated, .error {
border-width: 1px;
border-style: solid;
padding: 0 15px;
max-width: 950px;
margin-bottom: 1em;
}
.wrap .updated, .wrap .error {
margin: auto 0 0;
}
.updated a, .error a {
text-decoration: underline;
}
.updated a {
text-decoration: none;
padding-bottom: 2px;
}
.wrap h2 {

View File

@ -14,7 +14,7 @@
}
* html #wpbody {
_width: expression(document.documentElement.clientWidth > 962 ? "960px" : "99.9%");
_width: expression(document.documentElement.clientWidth > 962 ? "980px" : "99.9%");
}
* html #poststuff .postarea, * html #poststuff #titlediv {

View File

@ -26,21 +26,25 @@ if ( ! empty($cat_ID) ) {
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
<td><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->name); ?>" size="40" /></td>
<td><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->name); ?>" size="40" /><br />
<?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
<td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape($category->slug); ?>" size="40" /></td>
<td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape($category->slug); ?>" size="40" /><br />
<?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
<td>
<?php wp_dropdown_categories('hide_empty=0&name=category_parent&orderby=name&selected=' . $category->parent . '&hierarchical=1&show_option_none=' . __('None')); ?>
<?php wp_dropdown_categories('hide_empty=0&name=category_parent&orderby=name&selected=' . $category->parent . '&hierarchical=1&show_option_none=' . __('None')); ?><br />
<?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?>
</td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_description"><?php _e('Description (optional)') ?></label></th>
<td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->description); ?></textarea></td>
<th scope="row" valign="top"><label for="category_description"><?php _e('Description') ?></label></th>
<td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->description); ?></textarea><br />
<?php _e('The description is not prominent by default, however some themes may show it.'); ?></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>

View File

@ -99,7 +99,7 @@ $status_links = array();
$num_comments = wp_count_comments();
$stati = array('moderated' => sprintf(__('Awaiting Moderation (%s)'), "<span class='comment-count'>$num_comments->moderated</span>"), 'approved' => __('Approved'));
$class = ( '' === $comment_status ) ? ' class="current"' : '';
$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('All Comments')."</a>";
$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
foreach ( $stati as $status => $label ) {
$class = '';

View File

@ -19,6 +19,9 @@ $messages[3] = __('Custom field deleted.');
<h2><?php _e('Write Post') ?></h2>
<?php
if ( !empty( $draft_div ) )
echo $draft_div;
if (!isset($post_ID) || 0 == $post_ID) {
$form_action = 'post';
$temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post()
@ -146,11 +149,11 @@ if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_I
}
if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;post') . "</a>";
echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;post') . "</a>";
?>
<br class="clear" />
<?php if ($post_ID): ?>
<?php printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?>
<?php printf(__('Last edit: %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?>
<br class="clear" />
<?php endif; ?>
<span id="autosave"></span>

View File

@ -30,7 +30,8 @@ if ( ! empty($cat_ID) ) {
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="slug"><?php _e('Category slug') ?></label></th>
<td><input name="slug" id="slug" type="text" value="<?php echo $category->slug; ?>" size="40" /></td>
<td><input name="slug" id="slug" type="text" value="<?php echo $category->slug; ?>" size="40" />
<?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="description"><?php _e('Description (optional)') ?></label></th>

View File

@ -71,21 +71,24 @@ function xfn_check($class, $value = '', $deprecated = '') {
<div id="namediv" class="stuffbox">
<h3><?php _e('Name') ?></h3>
<div class="inside">
<input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" />
<input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br />
<?php _e('Example: Nifty blogging software'); ?>
</div>
</div>
<div id="addressdiv" class="stuffbox">
<h3><?php _e('Address') ?></h3>
<h3><?php _e('Web Address') ?></h3>
<div class="inside">
<input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" />
<input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br />
<?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?>
</div>
</div>
<div id="descriptiondiv" class="stuffbox">
<h3><?php _e('Description') ?></h3>
<div class="inside">
<input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" />
<input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br />
<?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?>
</div>
</div>
@ -132,10 +135,10 @@ function xfn_check($class, $value = '', $deprecated = '') {
<div class="inside">
<label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
<code>_blank</code></label>
<code>_blank</code></label><br />
<label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo(($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />
<code>_top</code></label>
<code>_top</code></label><br />
<label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php echo(($link->link_target == '') ? 'checked="checked"' : ''); ?> />
<?php _e('none') ?></label>
@ -258,22 +261,22 @@ function xfn_check($class, $value = '', $deprecated = '') {
<div id="linkadvanceddiv" class="postbox <?php echo postbox_classes('linkadvanceddiv', 'link'); ?>">
<h3><?php _e('Advanced') ?></h3>
<div class="inside">
<table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5">
<tr>
<th style="width: 20%;" scope="row"><?php _e('Image Address:') ?></th>
<td style="width: 80%;"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
<table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5">
<tr class="form-field">
<th valign="top" scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th>
<td><input type="text" name="link_image" id="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row"><?php _e('RSS Address:') ?> </th>
<tr class="form-field">
<th valign="top" scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th>
<td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Notes:') ?></th>
<td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>
<tr class="form-field">
<th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th>
<td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>
</tr>
<tr>
<th scope="row"><?php _e('Rating:') ?></th>
<td><select name="link_rating" size="1">
<tr class="form-field">
<th valign="top" scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th>
<td><select name="link_rating" id="link_rating" size="1">
<?php
for ($r = 0; $r < 10; $r++) {
echo(' <option value="'.$r.'" ');

View File

@ -128,7 +128,7 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
?>
<br class="clear" />
<?php if ($post_ID): ?>
<?php printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?>
<?php printf(__('Last edit: %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?>
<br class="clear" />
<?php endif; ?>
<span id="autosave"></span>

View File

@ -56,29 +56,30 @@ $nag_posts = array(
count($others_drafts))
);
$draft_div = '';
if ( !empty($my_drafts) || !empty($pending) || !empty($others_drafts) ) {
echo '<div class="wrap" id="draft-nag">';
$draft_div = '<div class="wrap" id="draft-nag">';
foreach ( $nag_posts as $nag ) {
if ( ${$nag[0]} ) {
echo '<p><strong>' . wp_specialchars($nag[1]) . '</strong> ';
$draft_div .= '<p><strong>' . wp_specialchars($nag[1]) . '</strong> ';
$i = 0;
foreach ( ${$nag[0]} as $post ) {
$i++;
if ( $i > $nag_posts_limit )
break;
echo '<a href="post.php?action=edit&amp;post=' . $post->ID . '">';
( '' == the_title('', '', FALSE) ) ? printf( __('Post #%s'), $post->ID ) : the_title();
echo '</a>';
$draft_div .= '<a href="post.php?action=edit&amp;post=' . $post->ID . '">';
$draft_div .= ( '' == the_title('', '', FALSE) ) ? sprintf( __('Post #%s'), $post->ID ) : get_the_title();
$draft_div .= '</a>';
if ( $i < min($nag[3], $nag_posts_limit) )
echo ', ';
$draft_div .= ', ';
}
if ( $nag[3] > $nag_posts_limit )
printf(__(', and <a href="%s">%d more</a>'), $nag[2], $nag[3] - $nag_posts_limit);
echo '.</p>';
$draft_div .= sprintf(__(', and <a href="%s">%d more</a>'), $nag[2], $nag[3] - $nag_posts_limit);
$draft_div .= '.</p>';
}
}
echo "</div>\n";
$draft_div .= "</div>\n";
}
// Show post form.

View File

@ -189,26 +189,6 @@ select {
display: none;
}
.updated, .error {
margin: auto 25px 20px 15px;
padding: 0 15px;
border-width: 1px;
border-style: solid;
}
.wrap .updated, .wrap .error {
margin: auto 0 0;
}
.updated a, .error a {
text-decoration: underline;
}
.updated a {
text-decoration: none;
padding-bottom: 2px;
}
.narrow {
width: 70%;
margin-bottom: 40px;
@ -361,7 +341,7 @@ textarea.all-options, input.all-options {
}
#poststuff #post-body {
margin-right: 16em;
margin-right: 230px;
}
#save {
@ -885,7 +865,7 @@ html, body {
#poststuff h3 {
font-size: 14px;
font-weight: bold;
padding: 8px 5px;
padding: 11px 5px;
margin: 0 0 10px;
}
@ -1002,10 +982,18 @@ html, body {
}
.submitbox {
width: 200px;
width: 220px;
float: right;
}
.submitbox .submitdelete {
border-bottom-width: 1px;
border-bottom-style: solid;
text-decoration: none;
margin-left: 8px;
padding-bottom: 1px;
}
.submitbox #previewview {
padding: 15px 10px;
@ -1021,6 +1009,7 @@ html, body {
.submitbox #previewview a {
padding: 6px;
text-decoration: none;
font-weight: normal;
border-bottom: none;
font-size: 14px;