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

git-svn-id: https://develop.svn.wordpress.org/trunk@11421 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-05-21 01:42:40 +00:00
parent 8a76759cae
commit 02930f69d6
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 ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
if ( 2 == $_REQUEST['fetch'] ) { if ( 2 == $_REQUEST['fetch'] ) {
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); 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 { } else {
add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id); echo get_media_item($id);

View File

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

View File

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

View File

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

View File

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