From 4ab8bee42d03925c3f94a94ccadea718060bd9aa Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 24 Apr 2013 21:54:17 +0000 Subject: [PATCH] Upgrade to Plupload 1.5.7, fixes #24163 git-svn-id: http://core.svn.wordpress.org/trunk@24076 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/plupload/changelog.txt | 14 ++++++++++++++ wp-includes/js/plupload/plupload.flash.js | 2 +- wp-includes/js/plupload/plupload.html4.js | 2 +- wp-includes/js/plupload/plupload.html5.js | 2 +- wp-includes/js/plupload/plupload.js | 4 ++-- .../js/plupload/plupload.silverlight.js | 2 +- .../js/plupload/plupload.silverlight.xap | Bin 44116 -> 44139 bytes wp-includes/script-loader.php | 12 ++++++------ 8 files changed, 26 insertions(+), 12 deletions(-) diff --git a/wp-includes/js/plupload/changelog.txt b/wp-includes/js/plupload/changelog.txt index 9a38d4ab15..7aaff4c8bf 100644 --- a/wp-includes/js/plupload/changelog.txt +++ b/wp-includes/js/plupload/changelog.txt @@ -1,3 +1,17 @@ +Version 1.5.7 (2013-04-10) + HTML5: Workaround for squish problem in iOS6, when uploading resized images. + HTML5: Fix failing workaround for FormData+Blob bug on Android... + HTML5: Allow multiple uploads on iOS. + Include VB build script that doesn't depend on Ant and is said to be native to Windows. +Version 1.5.6 (2013-02-28) + Fix regression: getPos() wrong on ie6/7. + HTML5: Send file as binary string if it was mangled, even if multipart is set to false. + HTML5: Add workaround Android browsers, that are unable to properly send blobs in FormData. + HTML4/Flash/Silverlight: Destroy fails to cleanup everything when container not defined. + UI, Queue: Use html() instead of text(), otherwise special characters fail to display properly. + UI, Queue: Use on() instead of delegate() or live(). Update examples to use jQuery 1.9.0 by default. + Queue: Blur rename input field when ESC is pressed. + Additional language packs: Slovak. Version 1.5.5 (2013-01-23) UI Widget: Fix sortable feature, broken in jQuery UI 1.9. Queue: Replace live() with delegate(), as live() was removed from jQuery 1.9. diff --git a/wp-includes/js/plupload/plupload.flash.js b/wp-includes/js/plupload/plupload.flash.js index aa87c6b840..7d3f0087c8 100644 --- a/wp-includes/js/plupload/plupload.flash.js +++ b/wp-includes/js/plupload/plupload.flash.js @@ -1 +1 @@ -(function(f,b,d,e){var a={},g={};function c(){var h;try{h=navigator.plugins["Shockwave Flash"];h=h.description}catch(j){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(i){h="0.0"}}h=h.match(/\d+/g);return parseFloat(h[0]+"."+h[1])}d.flash={trigger:function(j,h,i){setTimeout(function(){var m=a[j],l,k;if(m){m.trigger("Flash:"+h,i)}},0)}};d.runtimes.Flash=d.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,maxWidth:8091,maxHeight:8091,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(m,o){var k,l,h=0,i=b.body;if(c()<10){o({success:false});return}g[m.id]=false;a[m.id]=m;k=b.getElementById(m.settings.browse_button);l=b.createElement("div");l.id=m.id+"_flash_container";d.extend(l.style,{position:"absolute",top:"0px",background:m.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});l.className="plupload flash";if(m.settings.container){i=b.getElementById(m.settings.container);if(d.getStyle(i,"position")==="static"){i.style.position="relative"}}i.appendChild(l);(function(){var p,q;p='';if(d.ua.ie){q=b.createElement("div");l.appendChild(q);q.outerHTML=p;q=null}else{l.innerHTML=p}}());function n(){return b.getElementById(m.id+"_flash")}function j(){if(h++>5000){o({success:false});return}if(g[m.id]===false){setTimeout(j,1)}}j();k=l=null;m.bind("Destroy",function(p){var q;d.removeAllEvents(b.body,p.id);delete g[p.id];delete a[p.id];q=b.getElementById(p.id+"_flash_container");if(q){i.removeChild(q)}});m.bind("Flash:Init",function(){var r={},q;try{n().setFileFilters(m.settings.filters,m.settings.multi_selection)}catch(p){o({success:false});return}if(g[m.id]){return}g[m.id]=true;m.bind("UploadFile",function(s,u){var v=s.settings,t=m.settings.resize||{};n().uploadFile(r[u.id],v.url,{name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,width:t.width,height:t.height,quality:t.quality,multipart:v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,format:/\.(jpg|jpeg)$/i.test(u.name)?"jpg":"png",headers:v.headers,urlstream_upload:v.urlstream_upload})});m.bind("CancelUpload",function(){n().cancelUpload()});m.bind("Flash:UploadProcess",function(t,s){var u=t.getFile(r[s.id]);if(u.status!=d.FAILED){u.loaded=s.loaded;u.size=s.size;t.trigger("UploadProgress",u)}});m.bind("Flash:UploadChunkComplete",function(s,u){var v,t=s.getFile(r[u.id]);v={chunk:u.chunk,chunks:u.chunks,response:u.text};s.trigger("ChunkUploaded",t,v);if(t.status!==d.FAILED&&s.state!==d.STOPPED){n().uploadNextChunk()}if(u.chunk==u.chunks-1){t.status=d.DONE;s.trigger("FileUploaded",t,{response:u.text})}});m.bind("Flash:SelectFiles",function(s,v){var u,t,w=[],x;for(t=0;t';if(d.ua.ie){q=b.createElement("div");l.appendChild(q);q.outerHTML=p;q=null}else{l.innerHTML=p}}());function n(){return b.getElementById(m.id+"_flash")}function j(){if(h++>5000){o({success:false});return}if(g[m.id]===false){setTimeout(j,1)}}j();k=l=null;m.bind("Destroy",function(p){var q;d.removeAllEvents(b.body,p.id);delete g[p.id];delete a[p.id];q=b.getElementById(p.id+"_flash_container");if(q){q.parentNode.removeChild(q)}});m.bind("Flash:Init",function(){var r={},q;try{n().setFileFilters(m.settings.filters,m.settings.multi_selection)}catch(p){o({success:false});return}if(g[m.id]){return}g[m.id]=true;m.bind("UploadFile",function(s,u){var v=s.settings,t=m.settings.resize||{};n().uploadFile(r[u.id],v.url,{name:u.target_name||u.name,mime:d.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:v.chunk_size,width:t.width,height:t.height,quality:t.quality,multipart:v.multipart,multipart_params:v.multipart_params||{},file_data_name:v.file_data_name,format:/\.(jpg|jpeg)$/i.test(u.name)?"jpg":"png",headers:v.headers,urlstream_upload:v.urlstream_upload})});m.bind("CancelUpload",function(){n().cancelUpload()});m.bind("Flash:UploadProcess",function(t,s){var u=t.getFile(r[s.id]);if(u.status!=d.FAILED){u.loaded=s.loaded;u.size=s.size;t.trigger("UploadProgress",u)}});m.bind("Flash:UploadChunkComplete",function(s,u){var v,t=s.getFile(r[u.id]);v={chunk:u.chunk,chunks:u.chunks,response:u.text};s.trigger("ChunkUploaded",t,v);if(t.status!==d.FAILED&&s.state!==d.STOPPED){n().uploadNextChunk()}if(u.chunk==u.chunks-1){t.status=d.DONE;s.trigger("FileUploaded",t,{response:u.text})}});m.bind("Flash:SelectFiles",function(s,v){var u,t,w=[],x;for(t=0;t