Media Upload: Improve styling of error messages.

props afercia, michalzuber.
fixes #29047.
Built from https://develop.svn.wordpress.org/trunk@29355


git-svn-id: http://core.svn.wordpress.org/trunk@29131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-08-02 14:14:19 +00:00
parent 203c44581b
commit 8ea68677f3
7 changed files with 63 additions and 43 deletions

View File

@ -86,7 +86,7 @@ if ( isset( $_REQUEST['post_id'] ) ) {
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error($id) ) {
echo '<div class="error-div">
echo '<div class="error-div error">
<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a>
<strong>' . sprintf(__('&#8220;%s&#8221; has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' .
esc_html($id->get_error_message()) . '</div>';

View File

@ -102,7 +102,7 @@
display: block;
line-height: 36px;
float: left;
margin-left: 6px;
margin-left: 10px;
}
.media-item .describe-toggle-off,
@ -114,16 +114,18 @@
display: block;
}
#media-items .media-item {
border-bottom: 1px solid #dfdfdf;
.media-upload-form .media-item {
min-height: 36px;
margin-bottom: 1px;
position: relative;
width: 100%;
background: #fff;
}
.media-new-php #media-items {
margin: 1em 0;
.media-upload-form .media-item,
.media-upload-form .media-item .error {
-webkit-box-shadow: 0 1px 0 #dfdfdf;
box-shadow: 0 1px 0 #dfdfdf;
}
#media-items:empty {
@ -136,10 +138,6 @@
margin-right: 6px;
}
.media-item .error-div {
padding-right: 10px;
}
.media-item .pinkynail {
float: right;
margin: 2px 3px 0 10px;
@ -208,22 +206,20 @@
display: block;
}
.media-upload-form .media-item.error {
margin: 0;
padding: 0;
.media-upload-form .media-item.error,
.media-upload-form .media-item .error {
width: auto;
margin: 0 0 1px 0;
}
.media-upload-form .media-item.error p,
.media-item .error-div {
line-height: 16px;
margin: 5px 10px;
padding: 0;
.media-upload-form .media-item .error {
padding: 10px 14px 10px 0;
}
.media-item .error-div a.dismiss {
display: block;
float: left;
margin: 5px 15px 0 4px;
margin: 0 15px 0 10px;
}
/*------------------------------------------------------------------------------
@ -510,7 +506,7 @@ border color while dragging a file over the uploader drop area */
}
.media-disabled,
.imgedit-settings .disabled {
.imgedit-settings .disabled {
color: grey;
}
@ -725,4 +721,18 @@ audio, video {
font-size: 14px;
line-height: 1.5em;
}
.media-upload-form .media-item.error,
.media-upload-form .media-item .error {
font-size: 13px;
line-height: 1.5;
}
.media-upload-form .media-item.error {
padding: 1px 10px;
}
.media-upload-form .media-item .error {
padding: 10px 12px 10px 0;
}
}

View File

@ -102,7 +102,7 @@
display: block;
line-height: 36px;
float: right;
margin-right: 6px;
margin-right: 10px;
}
.media-item .describe-toggle-off,
@ -114,16 +114,18 @@
display: block;
}
#media-items .media-item {
border-bottom: 1px solid #dfdfdf;
.media-upload-form .media-item {
min-height: 36px;
margin-bottom: 1px;
position: relative;
width: 100%;
background: #fff;
}
.media-new-php #media-items {
margin: 1em 0;
.media-upload-form .media-item,
.media-upload-form .media-item .error {
-webkit-box-shadow: 0 1px 0 #dfdfdf;
box-shadow: 0 1px 0 #dfdfdf;
}
#media-items:empty {
@ -136,10 +138,6 @@
margin-left: 6px;
}
.media-item .error-div {
padding-left: 10px;
}
.media-item .pinkynail {
float: left;
margin: 2px 10px 0 3px;
@ -208,22 +206,20 @@
display: block;
}
.media-upload-form .media-item.error {
margin: 0;
padding: 0;
.media-upload-form .media-item.error,
.media-upload-form .media-item .error {
width: auto;
margin: 0 0 1px 0;
}
.media-upload-form .media-item.error p,
.media-item .error-div {
line-height: 16px;
margin: 5px 10px;
padding: 0;
.media-upload-form .media-item .error {
padding: 10px 0 10px 14px;
}
.media-item .error-div a.dismiss {
display: block;
float: right;
margin: 5px 4px 0 15px;
margin: 0 10px 0 15px;
}
/*------------------------------------------------------------------------------
@ -510,7 +506,7 @@ border color while dragging a file over the uploader drop area */
}
.media-disabled,
.imgedit-settings .disabled {
.imgedit-settings .disabled {
color: grey;
}
@ -725,4 +721,18 @@ audio, video {
font-size: 14px;
line-height: 1.5em;
}
.media-upload-form .media-item.error,
.media-upload-form .media-item .error {
font-size: 13px;
line-height: 1.5;
}
.media-upload-form .media-item.error {
padding: 1px 10px;
}
.media-upload-form .media-item .error {
padding: 10px 0 10px 12px;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1856,7 +1856,7 @@ do_action( 'post-html-upload-ui' );
?>
</div>
<span class="max-upload-size"><?php printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) ); ?></span>
<p class="max-upload-size"><?php printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) ); ?></p>
<?php
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.0-beta2-20140801';
$wp_version = '4.0-beta2-20140802';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.