From b6b321a203d715a411f136bd57ab1c9f4f45d4fc Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 24 Apr 2012 22:06:55 +0000 Subject: [PATCH] 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: http://svn.automattic.com/wordpress/trunk@20580 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/wp-admin.dev.css | 6 +++--- wp-includes/js/plupload/handlers.dev.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/css/wp-admin.dev.css b/wp-admin/css/wp-admin.dev.css index 3ff576ea80..3a5b9481a1 100644 --- a/wp-admin/css/wp-admin.dev.css +++ b/wp-admin/css/wp-admin.dev.css @@ -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; } /*------------------------------------------------------------------------------ diff --git a/wp-includes/js/plupload/handlers.dev.js b/wp-includes/js/plupload/handlers.dev.js index 7dd25db38a..faabdf5042 100644 --- a/wp-includes/js/plupload/handlers.dev.js +++ b/wp-includes/js/plupload/handlers.dev.js @@ -83,7 +83,7 @@ function uploadSuccess(fileObj, serverData) { serverData = serverData.replace(/^
(\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 {