Show "Delete" in Media -> Add New, props mgriepentrog, fixes #7879

git-svn-id: http://svn.automattic.com/wordpress/trunk@11421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-05-21 01:42:40 +00:00
parent cbe5ebd66d
commit 85766ab12e
5 changed files with 11 additions and 18 deletions

View File

@ -30,7 +30,7 @@ if ( !current_user_can('upload_files') )
if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
if ( 2 == $_REQUEST['fetch'] ) {
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id, array( 'send' => false, 'delete' => false ));
echo get_media_item($id, array( 'send' => false, 'delete' => true ));
} else {
add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id);

View File

@ -390,7 +390,7 @@ a.delete {
}
.submitbox .submitdelete:hover,
#media-upload a.delete:hover {
#media-items a.delete:hover {
color: #fff;
background-color: #f00;
border-bottom-color: #f00;
@ -467,7 +467,7 @@ a,
#poststuff #edButtonHTML,
#the-comment-list p.comment-author strong a,
#media-upload a.del-link,
#media-upload a.delete,
#media-items a.delete,
.ui-tabs-nav a,
.plugins a.delete {
color: #1c6280;
@ -711,10 +711,6 @@ abbr.required,
color: #f00;
}
#media-upload a.delete {
color: #888;
}
/* password strength meter */
#pass-strength-result {
background-color: #eee;

View File

@ -386,7 +386,7 @@ a.delete {
}
.submitbox .submitdelete:hover,
#media-upload a.delete:hover {
#media-items a.delete:hover {
color: #fff;
background-color: #f00;
border-bottom-color: #f00;
@ -463,7 +463,7 @@ a,
#poststuff #edButtonHTML,
#the-comment-list p.comment-author strong a,
#media-upload a.del-link,
#media-upload a.delete,
#media-items a.delete,
.ui-tabs-nav a,
.plugins a.delete {
color: #21759b;
@ -710,10 +710,6 @@ abbr.required,
color: #f00;
}
#media-upload a.delete {
color: #888;
}
#pass-strength-result {
background-color: #eee;
border-color: #ddd !important;

View File

@ -271,11 +271,6 @@ abbr.required {
width: auto;
}
#media-upload a.delete,
#media-upload a.del-link {
padding: 0 3px 1px;
}
#media-upload .del-attachment {
display: none;
margin: 5px 0;

View File

@ -2942,6 +2942,12 @@ button.dismiss {
border-right-style: solid;
}
#media-items a.delete,
#media-items a.del-link {
padding: 1px 4px 2px;
}
/* find posts */
.find-box {
width: 500px;