Uploader: fix progress bar JS and update the style (light blue bars), see #18206

git-svn-id: https://develop.svn.wordpress.org/trunk@19247 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-11-10 20:33:26 +00:00
parent 4b55413e42
commit 448af8627c
14 changed files with 153 additions and 159 deletions

File diff suppressed because one or more lines are too long

View File

@ -304,10 +304,6 @@ div.error a {
color: #666;
}
#wpbody-content #media-items .describe {
border-top-color: #dfdfdf;
}
.media-upload-form label.form-help,
td.help {
color: #9a9a9a;
@ -640,9 +636,9 @@ input.readonly, textarea.readonly {
border-color: #b0c8d7;
}
#media-items,
.imgedit-group,
.media-item {
#media-items .media-item,
#media-items .describe,
.imgedit-group {
border-color: #dfdfdf;
}

File diff suppressed because one or more lines are too long

View File

@ -312,10 +312,6 @@ div.error a {
color: #666;
}
#wpbody-content #media-items .describe {
border-top-color: #dfdfdf;
}
.media-upload-form label.form-help,
td.help {
color: #9a9a9a;
@ -638,9 +634,9 @@ input.readonly, textarea.readonly {
border-color: #dfdfdf;
}
#media-items,
.imgedit-group,
.media-item {
#media-items .media-item,
#media-items .describe {
border-color: #dfdfdf;
}

View File

@ -1 +1 @@
div#media-upload-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{margin:0 0 5px;}#library-form .progress,#gallery-form .progress,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}thead.media-item-info th,thead.media-item-info td{border:none;margin:0;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td{vertical-align:middle;padding:0 5px 8px 0;}.describe td.error{padding:2px 8px;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:normal;}#media-upload #media-items{border-bottom-width:1px;border-bottom-style:solid;width:623px;}#media-upload #media-items:empty{border:0 none;}#media-upload .media-item{border-style:solid solid none;border-width:1px 1px 0;min-height:36px;width:100%;}#media-upload .ui-sortable .media-item{cursor:move;}.filename{line-height:36px;padding:0 10px;overflow:hidden;}#media-upload .describe{width:100%;clear:both;cursor:default;}#media-upload .describe th.label{padding-top:.2em;text-align:left;min-width:120px;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:20%;text-align:center;}#media-upload th.actions-head{width:25%;text-align:center;}#media-upload a.wp-post-thumbnail{margin:0 20px;}#media-items a.delete{display:block;float:right;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #DADADA;}h3.media-title{font-size:1.6em;}h4.media-sub-title{border-bottom:1px solid #DADADA;font-size:1.3em;margin:12px;padding:0 0 3px;}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:normal;color:#5A5A5A;}#gallery-settings .describe td{vertical-align:middle;height:3em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1em 0 3px;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;}p.media-types{margin:1em;}tr.not-image{display:none;}table.not-image tr.not-image{display:table-row;}table.not-image tr.image-only{display:none;}
div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{margin:0 0 5px;}#library-form .progress,#gallery-form .progress,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td.error{padding:2px 8px;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:normal;}#media-upload .ui-sortable .media-item{cursor:move;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:20%;text-align:center;}#media-upload th.actions-head{width:25%;text-align:center;}#media-upload a.wp-post-thumbnail{margin:0 20px;}#media-items a.delete{display:block;float:right;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #DADADA;}h3.media-title{font-size:1.6em;}h4.media-sub-title{border-bottom:1px solid #DADADA;font-size:1.3em;margin:12px;padding:0 0 3px;}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:normal;color:#5A5A5A;}#gallery-settings .describe td{vertical-align:middle;height:3em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1em 0 3px;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;}p.media-types{margin:1em;}tr.not-image{display:none;}table.not-image tr.not-image{display:table-row;}table.not-image tr.image-only{display:none;}

View File

@ -1,6 +1,8 @@
/* Styles for the media library iframe (not used on the Library screen) */
div#media-upload-header {
margin: 0;
padding: 0 5px;
padding: 5px 5px 0;
font-weight: bold;
position: relative;
border-bottom-width: 1px;
@ -91,12 +93,6 @@ thead.media-item-info tr {
background-color: transparent;
}
thead.media-item-info th,
thead.media-item-info td {
border: none;
margin: 0;
}
.form-table thead.media-item-info {
border: 8px solid #fff;
}
@ -110,11 +106,6 @@ abbr.required {
display: inline;
}
.describe td {
vertical-align: middle;
padding: 0 5px 8px 0;
}
.describe td.error {
padding: 2px 8px;
}
@ -143,45 +134,10 @@ abbr.required {
font-weight: normal;
}
#media-upload #media-items {
border-bottom-width: 1px;
border-bottom-style: solid;
width: 623px;
}
#media-upload #media-items:empty {
border: 0 none;
}
#media-upload .media-item {
border-style: solid solid none;
border-width: 1px 1px 0;
min-height: 36px;
width: 100%;
}
#media-upload .ui-sortable .media-item {
cursor: move;
}
.filename {
line-height: 36px;
padding: 0 10px;
overflow: hidden;
}
#media-upload .describe {
width: 100%;
clear: both;
cursor: default;
}
#media-upload .describe th.label {
padding-top: .2em;
text-align: left;
min-width: 120px;
}
#media-upload tr.image-size {
margin-bottom: 1em;
height: 3em;

File diff suppressed because one or more lines are too long

View File

@ -998,7 +998,7 @@ span.description,
.describe-toggle-off {
float: left;
margin-right: 0;
margin-left: 20px;
margin-left: 15px;
}
.media-item .error-div {
@ -1010,17 +1010,13 @@ span.description,
float: right;
}
.crunching {
text-align: left;
margin-right: 0;
margin-left: 5px;
.media-item .describe td {
padding: 0 0 8px 8px;
}
.bar {
border-right-width: 0;
border-left-width: 3px;
border-right-style: none;
border-left-style: solid;
.media-item .progress {
float: left;
margin: 6px 0 0 10px;
}
/*------------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ TABLE OF CONTENTS:
12.0 - Categories
13.0 - Tags
14.0 - Media Screen
14.1 - Media Uploader
14.1 - Media Library
14.2 - Image Editor
15.0 - Comments Screen
16.0 - Themes
@ -3532,40 +3532,52 @@ p.popular-tags a {
14.0 - Media Screen
------------------------------------------------------------------------------*/
#wpbody-content #media-items .describe {
.media-item .describe {
border-collapse: collapse;
width: 100%;
border-top-style: solid;
border-top-width: 1px;
clear: both;
cursor: default;
padding: 5px;
}
#wpbody-content .describe th {
.media-item.media-blank .describe {
border: 0;
}
.media-item .describe th {
vertical-align: top;
text-align: left;
padding: 10px;
padding: 5px 10px 10px;
width: 140px;
}
#wpbody-content .describe .media-item-info tr {
.media-item .describe .align th {
padding-top: 0;
}
.media-item .media-item-info tr {
background-color: transparent;
}
#wpbody-content .describe .media-item-info td {
.media-item .describe td {
padding: 0 8px 8px 0;
vertical-align: top;
}
.media-item thead.media-item-info td {
padding: 4px 10px 0;
}
.describe .media-item-info .A1B1 {
.media-item .media-item-info .A1B1 {
padding: 0 0 0 10px;
}
#wpbody-content .filename {
padding: 0 10px;
.media-item td.savesend {
padding-bottom: 15px;
}
#wpbody-content .media-item .thumbnail {
.media-item .thumbnail {
max-height: 128px;
max-width: 128px;
}
@ -3610,12 +3622,12 @@ abbr.required {
text-decoration: none;
}
#wpbody-content .describe input[type="text"],
#wpbody-content .describe textarea {
.media-item .describe input[type="text"],
.media-item .describe textarea {
width: 460px;
}
#wpbody-content .describe p.help {
.media-item .describe p.help {
margin: 0;
padding: 0 0 0 5px;
}
@ -3626,39 +3638,40 @@ abbr.required {
display: block;
line-height: 36px;
float: right;
margin-right: 20px;
margin-right: 15px;
}
.describe-toggle-off {
.media-item .describe-toggle-off,
.media-item.open .describe-toggle-on,
.media-item.open img.pinkynail {
display: none;
}
#wpbody-content .media-item {
border-bottom-style: solid;
border-bottom-width: 1px;
.media-item.open .describe-toggle-off {
display: block;
}
#media-items .media-item {
border-style: solid;
border-width: 1px;
min-height: 36px;
position: relative;
margin-top: -1px;
width: 100%;
}
#wpbody-content .media-single .media-item {
border-bottom-style: none;
border-bottom-width: 0;
#media-items {
width: 623px;
}
#wpbody-content #media-items {
border-style: solid solid none;
border-width: 1px;
width: 670px;
}
#wpbody-content #media-items:empty {
#media-items:empty {
border: 0 none;
}
#wpbody-content #media-items .filename {
.media-item .filename {
line-height: 36px;
overflow: hidden;
padding: 0 10px;
}
.media-item .error-div {
@ -3667,7 +3680,7 @@ abbr.required {
.media-item .pinkynail {
float: left;
margin: 2px;
margin: 0 2px;
max-width: 40px;
max-height: 32px;
}
@ -3680,27 +3693,55 @@ abbr.required {
.media-item .original {
position: relative;
height: 34px;
width: 503px;
}
.crunching {
display: block;
line-height: 32px;
text-align: right;
margin-right: 5px;
.media-item .progress {
float: right;
height: 22px;
margin: 6px 10px 0 0;
width: 200px;
text-align: center;
line-height: 2em;
padding: 0;
overflow: hidden;
margin-bottom: 2px;
border: 1px solid #d1d1d1;
background: #fff;
background-image: linear-gradient(bottom, rgb(255,255,255) 0%, rgb(247,247,247) 100%);
background-image: -o-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(247,247,247) 100%);
background-image: -moz-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(247,247,247) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(247,247,247) 100%);
background-image: -ms-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(247,247,247) 100%);
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
}
.progress {
position: relative;
margin-bottom: -36px;
height: 36px;
}
.bar {
.media-item .bar {
z-index: 9;
width: 0;
height: 100%;
border-right-width: 3px;
border-right-style: solid;
margin-top: -24px;
background-color: #83B4D8;
background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 0 3px rgba(0,0,0,0.3);
box-shadow: 0 0 3px rgba(0,0,0,0.3);
}
.media-item .progress .percent {
z-index: 10;
position: relative;
width: 200px;
text-align: center;
text-shadow: 0 1px 0 rgba(255,255,255,0.4);
color: rgba(0,0,0,0.6);
}
.upload-php .fixed .column-parent {
@ -3709,7 +3750,7 @@ abbr.required {
/*------------------------------------------------------------------------------
14.1 - Media Uploader
14.1 - Media Library
------------------------------------------------------------------------------*/
.find-box {

View File

@ -1320,7 +1320,7 @@ $plupload_init = array(
'drop_element' => 'drag-drop-area',
'file_data_name' => 'async-upload',
'multiple_queues' => true,
'max_file_size' => round( (int) $max_upload_size / 1024 ) . 'kb',
'max_file_size' => $max_upload_size . 'b',
'url' => $upload_action_url,
'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),

View File

@ -8,16 +8,17 @@ function fileDialogStart() {
function fileQueued(fileObj) {
// Get rid of unused form
jQuery('.media-blank').remove();
var items = jQuery('#media-items').children();
// Collapse a single item
if ( jQuery('form.type-form #media-items').children().length == 1 && jQuery('.hidden', '#media-items').length > 0 ) {
jQuery('.describe-toggle-on').show();
jQuery('.describe-toggle-off').hide();
jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');
if ( items.length == 1 ) {
items.removeClass('open').find('.slidetoggle').slideUp(200);
}
// Create a progress bar containing the filename
jQuery('#media-items').append('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> ' + fileObj.name + '</div></div>');
jQuery('#media-items').append('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><div class="progress"><div class="percent">0%</div><div class="bar"></div></div><div class="filename original"> ' + fileObj.name + '</div></div>');
// Display the progress div
jQuery('.progress', '#media-item-' + fileObj.id).show();
jQuery('.progress', jQuery('#media-item-' + fileObj.id)).fadeIn();
// Disable submit
jQuery('#insert-gallery').prop('disabled', true);
@ -32,22 +33,17 @@ function uploadStart(fileObj) {
return true;
}
function uploadProgress(fileObj, bytesDone, bytesTotal) { // Lengthen the progress bar
var w = jQuery('#media-items').width() - 2, item = jQuery('#media-item-' + fileObj.id);
jQuery('.bar', item).width( w * bytesDone / bytesTotal );
jQuery('.percent', item).html( Math.ceil(bytesDone / bytesTotal * 100) + '%' );
if ( bytesDone == bytesTotal )
jQuery('.bar', item).html('<strong class="crunching">' + pluploadL10n.crunching + '</strong>');
}
function updateMediaForm() {
var one = jQuery('form.type-form #media-items').children(), items = jQuery('#media-items').children();
var items = jQuery('#media-items').children();
// Just one file, no need for collapsible part
if ( one.length == 1 ) {
jQuery('.slidetoggle', one).slideDown(500).siblings().addClass('hidden').filter('.toggle').toggle();
if ( items.length == 1 ) {
items.addClass('open').find('.slidetoggle').slideDown();
jQuery('.insert-gallery').hide();
} else if ( items.length > 1 ) {
items.removeClass('open');
// Only show Gallery button when there are at least two files.
jQuery('.insert-gallery').show();
}
// Only show Save buttons when there is at least one file.
@ -55,18 +51,14 @@ function updateMediaForm() {
jQuery('.savebutton').show();
else
jQuery('.savebutton').hide();
// Only show Gallery button when there are at least two files.
if ( items.length > 1 )
jQuery('.insert-gallery').show();
else
jQuery('.insert-gallery').hide();
}
function uploadSuccess(fileObj, serverData) {
var item = jQuery('#media-item-' + fileObj.id);
// if async-upload returned an error message, place it in the media item div and return
if ( serverData.match('media-upload-error') ) {
jQuery('#media-item-' + fileObj.id).html(serverData);
item.html(serverData);
return;
}
@ -74,7 +66,7 @@ function uploadSuccess(fileObj, serverData) {
updateMediaForm();
// Increment the counter.
if ( jQuery('#media-item-' + fileObj.id).hasClass('child-of-' + post_id) )
if ( item.hasClass('child-of-' + post_id) )
jQuery('#attachments-count').text(1 * jQuery('#attachments-count').text() + 1);
}
@ -134,7 +126,12 @@ function prepareMediaItemInit(fileObj) {
window.scrollTo(0, t - 36);
}
});
jQuery(this).siblings('.toggle').andSelf().toggle();
if ( jQuery(this).is('.describe-toggle-on') )
item.addClass('open');
else
item.removeClass('open');
jQuery(this).siblings('a.toggle').focus();
return false;
});
@ -180,7 +177,7 @@ function prepareMediaItemInit(fileObj) {
jQuery('.filename .trashnotice', item).remove();
jQuery('.filename .title', item).css('font-weight','normal');
jQuery('a.undo', item).addClass('hidden');
jQuery('a.describe-toggle-on, .menu_order_input', item).show();
jQuery('.menu_order_input', item).show();
item.css( {backgroundColor:'#ceb'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 500, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('undo');
}
});
@ -373,6 +370,9 @@ jQuery(document).ready(function($){
}).bind('dragleave.wp-uploader, drop.wp-uploader', function(){
$(this).css('border-color', '');
});
} else {
$('#plupload-upload-ui').removeClass('drag-drop');
$('#drag-drop-area').unbind('.wp-uploader');
}
});
@ -381,7 +381,7 @@ jQuery(document).ready(function($){
uploader.bind('FilesAdded', function(up, files) {
$.each(files, function(i, file) {
/*
if ( up.features.chunks && up.runtime != 'flash' && file.size > 1048576 )
if ( up.features.chunks && file.size > 1048576 )
up.settings.chunk_size = '1048576';
else
delete(up.settings.chunk_size);
@ -400,7 +400,16 @@ jQuery(document).ready(function($){
});
uploader.bind('UploadProgress', function(up, file) {
uploadProgress(file, file.loaded, file.size);
var item = $('#media-item-' + file.id);
$('.bar', item).width( (200 * file.percent) / 100 );
$('.percent', item).html( file.percent + '%' );
if ( file.percent == 100 ) {
setTimeout( function(){
$('.percent', item).html( pluploadL10n.crunching );
}, 200 );
}
});
uploader.bind('Error', function(up, err) {

File diff suppressed because one or more lines are too long

View File

@ -220,7 +220,7 @@ function wp_default_scripts( &$scripts ) {
// cannot use the plupload.full.js, as it loads browserplus init JS from Yahoo
$scripts->add( 'plupload-all', false, array('plupload', 'plupload-html5', 'plupload-flash', 'plupload-silverlight', 'plupload-html4'), '1511');
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery'), '20111102');
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery'), '20111110');
$scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
// keep 'swfupload' for back-compat.
@ -431,13 +431,13 @@ function wp_default_styles( &$styles ) {
// Any rtl stylesheets that don't have a .dev version for ltr
$no_suffix = array( 'farbtastic' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20111110' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20111110a' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20111015' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
// all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20111110';
$colors_version = '20111110a';
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
$styles->add( 'colors', true, array('wp-admin'), $colors_version );
@ -446,7 +446,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'colors-fresh', "/wp-admin/css/colors-fresh$suffix.css", array('wp-admin'), $colors_version );
$styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array('wp-admin'), $colors_version );
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20111101' );
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20111110' );
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20111107' ); // Readme as well
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.3u1' );