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
This commit is contained in:
Matt Mullenweg 2008-03-10 23:55:26 +00:00
parent 9dacb23732
commit 3ceedb1ba8
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,9 @@ function uploadStart(fileObj) { return true; }
function uploadProgress(fileObj, bytesDone, bytesTotal) { function uploadProgress(fileObj, bytesDone, bytesTotal) {
// Lengthen the progress bar // Lengthen the progress bar
jQuery('#media-item-' + fileObj.id + ' .bar').width(620*bytesDone/bytesTotal); jQuery('#media-item-' + fileObj.id + ' .bar').width(620*bytesDone/bytesTotal);
if ( bytesDone== bytesTotal )
jQuery('#media-item-' + fileObj.id + ' .bar').html('<strong style="display: block; padding-top: 9px; padding-left: 1em;">Crunching&hellip;</strong>');
} }
function prepareMediaItem(fileObj, serverData) { function prepareMediaItem(fileObj, serverData) {
@ -96,6 +99,7 @@ function uploadSuccess(fileObj, serverData) {
jQuery('#media-item-' + fileObj.id).html(serverData); jQuery('#media-item-' + fileObj.id).html(serverData);
return; return;
} }
prepareMediaItem(fileObj, serverData); prepareMediaItem(fileObj, serverData);
updateMediaForm(); updateMediaForm();