Uploader: fix check for error message send from async-upload on failed uploads, improve styling it a bit, props trepmal, SergeyBiryukov, fixes #20445
git-svn-id: https://develop.svn.wordpress.org/trunk@20580 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d04dbfb0e5
commit
f55dbdbd27
|
@ -3687,14 +3687,14 @@ abbr.required {
|
|||
.media-upload-form .media-item.error p,
|
||||
.media-item .error-div {
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
margin: 10px;
|
||||
margin: 5px 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.media-item .error-div a.dismiss {
|
||||
display: block;
|
||||
float: right;
|
||||
padding-left: 15px;
|
||||
margin: 5px 4px 0 15px;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
|
|
|
@ -83,7 +83,7 @@ function uploadSuccess(fileObj, serverData) {
|
|||
serverData = serverData.replace(/^<pre>(\d+)<\/pre>$/, '$1');
|
||||
|
||||
// if async-upload returned an error message, place it in the media item div and return
|
||||
if ( serverData.match('media-upload-error') ) {
|
||||
if ( serverData.match(/media-upload-error|error-div/) ) {
|
||||
item.html(serverData);
|
||||
return;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue