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:
parent
9dacb23732
commit
3ceedb1ba8
|
@ -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…</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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue