Make the Save All Changes initially hidden on Media -> Add New screen, improve the progress bar "progress" to 1px ticks, see #19190

git-svn-id: https://develop.svn.wordpress.org/trunk@19306 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-11-15 21:22:27 +00:00
parent 88b1b11435
commit a77387cac7
3 changed files with 5 additions and 11 deletions

View File

@ -101,7 +101,7 @@ if ( isset($_GET['inline']) ) {
<input type="hidden" name="post_id" id="post_id" value="0" />
<?php wp_nonce_field('media-form'); ?>
<div id="media-items" class="hide-if-no-js"></div>
<?php submit_button( __( 'Save all changes' ), 'button savebutton hide-if-no-js', 'save' ); ?>
<?php submit_button( __( 'Save all changes' ), 'button savebutton hidden', 'save' ); ?>
</form>
</div>

View File

@ -36,14 +36,8 @@ function uploadStart() {
function uploadProgress(up, file) {
var item = jQuery('#media-item-' + file.id);
jQuery('.bar', item).width( (200 * file.percent) / 100 );
jQuery('.bar', item).width( (200 * file.loaded) / file.size );
jQuery('.percent', item).html( file.percent + '%' );
if ( file.percent == 100 ) {
setTimeout( function(){
jQuery('.percent', item).html( pluploadL10n.crunching );
}, 200 );
}
}
// check to see if a large file failed to upload
@ -57,8 +51,6 @@ function fileUploading(up, file) {
if ( up.current && up.current.file.id == file.id && up.current.xhr.abort )
up.current.xhr.abort();
up.removeFile(file);
}
}, 10000); // wait for 10 sec. for the file to start uploading
}
@ -91,6 +83,8 @@ function uploadSuccess(fileObj, serverData) {
if ( serverData.match('media-upload-error') ) {
item.html(serverData);
return;
} else if ( fileObj.status == 5 ) {
jQuery('.percent', item).html( pluploadL10n.crunching );
}
prepareMediaItem(fileObj, serverData);

File diff suppressed because one or more lines are too long