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: http://svn.automattic.com/wordpress/trunk@19306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d61b1474f9
commit
28ec7872a2
|
@ -101,7 +101,7 @@ if ( isset($_GET['inline']) ) {
|
||||||
<input type="hidden" name="post_id" id="post_id" value="0" />
|
<input type="hidden" name="post_id" id="post_id" value="0" />
|
||||||
<?php wp_nonce_field('media-form'); ?>
|
<?php wp_nonce_field('media-form'); ?>
|
||||||
<div id="media-items" class="hide-if-no-js"></div>
|
<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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,8 @@ function uploadStart() {
|
||||||
function uploadProgress(up, file) {
|
function uploadProgress(up, file) {
|
||||||
var item = jQuery('#media-item-' + file.id);
|
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 + '%' );
|
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
|
// 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 )
|
if ( up.current && up.current.file.id == file.id && up.current.xhr.abort )
|
||||||
up.current.xhr.abort();
|
up.current.xhr.abort();
|
||||||
|
|
||||||
up.removeFile(file);
|
|
||||||
}
|
}
|
||||||
}, 10000); // wait for 10 sec. for the file to start uploading
|
}, 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') ) {
|
if ( serverData.match('media-upload-error') ) {
|
||||||
item.html(serverData);
|
item.html(serverData);
|
||||||
return;
|
return;
|
||||||
|
} else if ( fileObj.status == 5 ) {
|
||||||
|
jQuery('.percent', item).html( pluploadL10n.crunching );
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareMediaItem(fileObj, serverData);
|
prepareMediaItem(fileObj, serverData);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue