Add page options to edit/write page, remove the IE6 scrollbar hack (seems not to be needed any more), add the min-width to all admin pages, add the Page Options link to the end of the breadcrumbs

git-svn-id: http://svn.automattic.com/wordpress/trunk@9063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-10-02 11:04:09 +00:00
parent 28bc7d7528
commit 3d29e571fb
4 changed files with 27 additions and 44 deletions

View File

@ -10,25 +10,6 @@
if (!isset($_GET["page"])) require_once('admin.php');
wp_enqueue_script( 'wp-gears' );
$min_width_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php', 'widgets.php', 'comment.php', 'link.php' );
$the_current_page = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);
$ie6_no_scrollbar = true;
/**
* Append 'minwidth' to value.
*
* @param mixed $c
* @return string
*/
function add_minwidth($c) {
return $c . 'minwidth ';
}
if ( in_array( $the_current_page, $min_width_pages ) ) {
$ie6_no_scrollbar = false;
add_filter( 'admin_body_class', 'add_minwidth' );
}
get_admin_page_title();
$title = wp_specialchars( strip_tags( $title ) );
?>
@ -50,9 +31,7 @@ wp_admin_css( 'css/ie' );
addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}};
//]]>
</script>
<?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') && $ie6_no_scrollbar ) : ?>
<style type="text/css">* html { overflow-x: hidden; }</style>
<?php endif;
<?php
$hook_suffixes = array();
@ -86,8 +65,18 @@ if ( 'index.php' == $pagenow ) {
} else {
$breadcrumb = '<a href="index.php">' . __('Dashboard') . '</a> &rsaquo; ' . $title;
}
$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php', 'post.php', 'page-new.php', 'page.php' );
?>
<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?> <a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="View site" id="view-site-link"><img src="<?php echo trailingslashit( bloginfo('wpurl') ) . 'wp-admin/images/new-window-icon.gif'; ?>" alt="View site" /></a><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1>
<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?> <a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="View site" id="view-site-link"><img src="<?php echo trailingslashit( bloginfo('wpurl') ) . 'wp-admin/images/new-window-icon.gif'; ?>" alt="" /></a>
<span id="breadcrumb"><?php echo $breadcrumb ?></span>
<?php if ( in_array( $pagenow, $settings_pages ) ) { ?>
<span id="edit-settings">
<a href="#edit_settings" id="show-settings-link" class="hide-if-no-js show-settings"><?php _e('Page Options') ?></a>
<a href="#edit_settings" id="hide-settings-link" class="show-settings" style="display:none;"><?php _e('Hide Options') ?></a>
</span>
<?php } ?></h1>
</div>
<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p></div>
@ -104,12 +93,3 @@ if ( $parent_file == 'options-general.php' ) {
}
favorite_actions();
$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php' );
if ( in_array( $pagenow, $settings_pages ) ) { ?>
<div id="edit-settings">
<a href="#edit_settings" id="show-settings-link" class="hide-if-no-js show-settings"><?php _e('Page Options') ?></a>
<a href="#edit_settings" id="hide-settings-link" class="show-settings" style="display:none;"><?php _e('Hide Options') ?></a>
</div>
<?php } ?>

View File

@ -239,7 +239,8 @@ div.dashboard-widget-submit input,
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover {
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover,
#edit-settings a.show-settings:hover {
color: #d54e21;
}
@ -350,7 +351,7 @@ h3.dashboard-widget-title small a:hover {
color: #5a5a5a;
}
#poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-sortable .postbox h3:hover span, a {
#poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-sortable .postbox h3:hover span, a, #edit-settings a.show-settings {
color: #2e7ca0;
}

View File

@ -239,7 +239,8 @@ div.dashboard-widget-submit input,
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover {
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover,
#edit-settings a.show-settings:hover {
color: #d54e21;
}
@ -348,7 +349,7 @@ h3.dashboard-widget-title small a:hover {
color: #333;
}
#adminmenu a, #adminmenu ul.wp-submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, .ui-sortable .postbox h3:hover span, a {
#adminmenu a, #adminmenu ul.wp-submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, .ui-sortable .postbox h3:hover span, a, #edit-settings a.show-settings {
color: #2583ad;
}

View File

@ -634,7 +634,6 @@ a#view-site-link {
}
#wphead #breadcrumb {
position: absolute;
margin-top: 12px;
margin-left: 10px;
font: 16px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
@ -1623,7 +1622,7 @@ td.post-title p {
vertical-align: middle;
}
body.minwidth {
body.wp-admin {
min-width: 785px;
}
@ -2060,13 +2059,10 @@ a.togbox {
/* show/hide settings */
#edit-settings {
position: absolute;
right: 200px;
top: 46px;
margin-left: 20px;
}
.show-settings {
display: block;
#edit-settings a.show-settings {
height: 18px;
font-size: 11px;
text-decoration: none;
@ -2074,6 +2070,10 @@ a.togbox {
padding: 3px 8px;
}
#edit-settings a.show-settings:hover {
text-decoration: none;
}
#edit-settings-wrap h5 {
padding: 10px 0 0 15px;
margin: 0;
@ -2103,7 +2103,8 @@ a.togbox {
float: left;
padding: 5px 3px;
white-space: nowrap;
width: 12em;
overflow: hidden;
width: 13em;
}
.metabox-prefs label input {