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:
parent
203c44581b
commit
8ea68677f3
|
@ -86,7 +86,7 @@ if ( isset( $_REQUEST['post_id'] ) ) {
|
||||||
|
|
||||||
$id = media_handle_upload( 'async-upload', $post_id );
|
$id = media_handle_upload( 'async-upload', $post_id );
|
||||||
if ( is_wp_error($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>
|
<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a>
|
||||||
<strong>' . sprintf(__('“%s” has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' .
|
<strong>' . sprintf(__('“%s” has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' .
|
||||||
esc_html($id->get_error_message()) . '</div>';
|
esc_html($id->get_error_message()) . '</div>';
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 6px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item .describe-toggle-off,
|
.media-item .describe-toggle-off,
|
||||||
|
@ -114,16 +114,18 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media-items .media-item {
|
.media-upload-form .media-item {
|
||||||
border-bottom: 1px solid #dfdfdf;
|
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
|
margin-bottom: 1px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-new-php #media-items {
|
.media-upload-form .media-item,
|
||||||
margin: 1em 0;
|
.media-upload-form .media-item .error {
|
||||||
|
-webkit-box-shadow: 0 1px 0 #dfdfdf;
|
||||||
|
box-shadow: 0 1px 0 #dfdfdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media-items:empty {
|
#media-items:empty {
|
||||||
|
@ -136,10 +138,6 @@
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item .error-div {
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.media-item .pinkynail {
|
.media-item .pinkynail {
|
||||||
float: right;
|
float: right;
|
||||||
margin: 2px 3px 0 10px;
|
margin: 2px 3px 0 10px;
|
||||||
|
@ -208,22 +206,20 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-upload-form .media-item.error {
|
.media-upload-form .media-item.error,
|
||||||
margin: 0;
|
.media-upload-form .media-item .error {
|
||||||
padding: 0;
|
width: auto;
|
||||||
|
margin: 0 0 1px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-upload-form .media-item.error p,
|
.media-upload-form .media-item .error {
|
||||||
.media-item .error-div {
|
padding: 10px 14px 10px 0;
|
||||||
line-height: 16px;
|
|
||||||
margin: 5px 10px;
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item .error-div a.dismiss {
|
.media-item .error-div a.dismiss {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
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,
|
.media-disabled,
|
||||||
.imgedit-settings .disabled {
|
.imgedit-settings .disabled {
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,4 +721,18 @@ audio, video {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.5em;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 6px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item .describe-toggle-off,
|
.media-item .describe-toggle-off,
|
||||||
|
@ -114,16 +114,18 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media-items .media-item {
|
.media-upload-form .media-item {
|
||||||
border-bottom: 1px solid #dfdfdf;
|
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
|
margin-bottom: 1px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-new-php #media-items {
|
.media-upload-form .media-item,
|
||||||
margin: 1em 0;
|
.media-upload-form .media-item .error {
|
||||||
|
-webkit-box-shadow: 0 1px 0 #dfdfdf;
|
||||||
|
box-shadow: 0 1px 0 #dfdfdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media-items:empty {
|
#media-items:empty {
|
||||||
|
@ -136,10 +138,6 @@
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item .error-div {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.media-item .pinkynail {
|
.media-item .pinkynail {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 2px 10px 0 3px;
|
margin: 2px 10px 0 3px;
|
||||||
|
@ -208,22 +206,20 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-upload-form .media-item.error {
|
.media-upload-form .media-item.error,
|
||||||
margin: 0;
|
.media-upload-form .media-item .error {
|
||||||
padding: 0;
|
width: auto;
|
||||||
|
margin: 0 0 1px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-upload-form .media-item.error p,
|
.media-upload-form .media-item .error {
|
||||||
.media-item .error-div {
|
padding: 10px 0 10px 14px;
|
||||||
line-height: 16px;
|
|
||||||
margin: 5px 10px;
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-item .error-div a.dismiss {
|
.media-item .error-div a.dismiss {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
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,
|
.media-disabled,
|
||||||
.imgedit-settings .disabled {
|
.imgedit-settings .disabled {
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,4 +721,18 @@ audio, video {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.5em;
|
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
|
@ -1856,7 +1856,7 @@ do_action( 'post-html-upload-ui' );
|
||||||
?>
|
?>
|
||||||
</div>
|
</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
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue