From 3ceedb1ba8087394dafc780a3f0b14c4040604aa Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 10 Mar 2008 23:55:26 +0000 Subject: [PATCH] Show a message after the upload has finished but before the return HTML is finished. git-svn-id: https://develop.svn.wordpress.org/trunk@7220 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/swfupload/handlers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/js/swfupload/handlers.js b/wp-includes/js/swfupload/handlers.js index 812567c5ae..add138436c 100644 --- a/wp-includes/js/swfupload/handlers.js +++ b/wp-includes/js/swfupload/handlers.js @@ -28,6 +28,9 @@ function uploadStart(fileObj) { return true; } function uploadProgress(fileObj, bytesDone, bytesTotal) { // Lengthen the progress bar jQuery('#media-item-' + fileObj.id + ' .bar').width(620*bytesDone/bytesTotal); + + if ( bytesDone== bytesTotal ) + jQuery('#media-item-' + fileObj.id + ' .bar').html('Crunching…'); } function prepareMediaItem(fileObj, serverData) { @@ -96,6 +99,7 @@ function uploadSuccess(fileObj, serverData) { jQuery('#media-item-' + fileObj.id).html(serverData); return; } + prepareMediaItem(fileObj, serverData); updateMediaForm();