Shortcuts drop-down

git-svn-id: http://svn.automattic.com/wordpress/trunk@9003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-09-27 12:02:32 +00:00
parent 6a527db989
commit 5f6a6dbe35
5 changed files with 79 additions and 21 deletions

View File

@ -78,10 +78,14 @@ strong .post-com-count span {
#post-body ul#category-tabs li.ui-tabs-selected, .button-secondary,
#quicktags, #login form .submit input, .search-box .button,
#ed_reply_toolbar {
#ed_reply_toolbar, .favorite-action, #favorite-first {
background-color: #8ebddc !important;
}
#favorite-actions .favorite-action {
border-top-color: #8ebddc;
}
ul#widget-list li.widget-list-item h4.widget-title {
background-color: #f0f0f0;
color: #000;
@ -209,7 +213,14 @@ ul#widget-list li.widget-list-item h4.widget-title {
color: #666;
}
.submit input, .button, .button-secondary, #login form .submit input, div.dashboard-widget-submit input, #edit-slug-buttons a.save {
.submit input,
.button,
.button-secondary,
#login form .submit input,
div.dashboard-widget-submit input,
#edit-slug-buttons a.save,
.favorite-action,
#favorite-first {
background-color: #e5e5e5;
color: #07273e;
border-color: #a3a3a3;

View File

@ -78,10 +78,14 @@ strong .post-com-count span {
#post-body ul#category-tabs li.ui-tabs-selected, .button-secondary,
#quicktags, #login form .submit input, .search-box .button,
#ed_reply_toolbar {
#ed_reply_toolbar, .favorite-action, #favorite-first {
background-color: #cee1ef !important;
}
#favorite-actions .favorite-action {
border-top-color: #cee1ef;
}
ul#widget-list li.widget-list-item h4.widget-title {
background-color: #f0f0f0;
color: #000;
@ -209,7 +213,14 @@ ul#widget-list li.widget-list-item h4.widget-title {
color: #666;
}
.submit input, .button, .button-secondary, #login form .submit input, div.dashboard-widget-submit input, #edit-slug-buttons a.save {
.submit input,
.button,
.button-secondary,
#login form .submit input,
div.dashboard-widget-submit input,
#edit-slug-buttons a.save,
.favorite-action,
#favorite-first {
background-color: #e5e5e5;
color: #246;
border-color: #80b5d0;

View File

@ -2479,23 +2479,20 @@ function the_post_password() {
function favorite_actions() {
$actions = array(
'post-new.php' => __('Add New Post'),
'page-new.php' => __('Add New Page'),
'edit-comments.php' => __('Manage Comments')
);
$actions = apply_filters('favorite_actions', $actions);
echo '<form class="favorites-form" action="" method="get">';
echo '<p id="favorite-actions" class="favorite-actions">';
echo '<select name="favorite-action">';
echo '<div id="favorite-actions">';
echo '<div id="favorite-first"><a href="post-new.php">' . __('Add New Post') . '</a></div>';
echo '<div id="favorite-action">';
foreach ( $actions as $action => $label) {
echo "<option value='$action'>";
echo "<div class='favorite-action'><a href='$action'>";
echo $label;
echo "</option>\n";
echo "</a></div>\n";
}
echo '</select>';
echo '<input type="submit" value="' . __('Go') . '" name="doaction" id="doaction" class="button action" />';
echo '</p>';
echo '</form>';
echo "</div></div>\n";
}
?>

View File

@ -76,6 +76,8 @@ jQuery( function($) {
$('#adminmenu li.wp-has-submenu > a').click( function() { return menuToggle( $(this).siblings('ul') ); } );
$('#dashmenu li.wp-has-submenu').bind( 'mouseenter mouseleave', function() { return menuToggle( $(this).children('ul'), 'toggle' ); } );
$('#favorite-actions').bind( 'mouseenter mouseleave', function(){$('#favorite-action').slideToggle('fast')} );
} );

View File

@ -1579,13 +1579,6 @@ p.search-box .button, #widget-search .button {
border-style: solid;
}
p.favorite-actions {
position: absolute;
right: 15px;
top: 52px;
margin: 0;
}
#posts-filter fieldset {
float: left;
margin: 0 1.5ex 1em 0;
@ -2497,3 +2490,47 @@ abbr.required {
.find-box-search label {
padding-right: 6px;
}
/* favorite-actions */
#favorite-actions {
position: absolute;
right: 15px;
top: 55px;
width: 130px;
z-index: 10;
}
#favorite-first {
-moz-border-radius: 4px;
-khtml-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
border-width: 1px;
border-style: solid;
padding: 4px 8px;
}
.favorite-action {
margin: -3px 0 0;
padding: 4px 8px;
border-width: 1px;
border-top-width: 3px;
border-style: solid;
-moz-border-radius: 0 0 4px 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-khtml-border-bottom-right-radius: 4px;
-khtml-border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
#favorite-action {
padding: 0;
margin: 0;
display: none;
}
#favorite-actions a {
padding: 4px 0;
text-decoration: none;
}