From 6adf190b8f0899baec5bc6869e090c1a58c89c39 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 17 May 2009 12:29:58 +0000 Subject: [PATCH] Update SWFUpload to 2.2.0.1, see #9413 git-svn-id: https://develop.svn.wordpress.org/trunk@11372 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/css/media.css | 51 +-- wp-admin/includes/media.php | 28 +- wp-admin/js/gallery.dev.js | 20 +- wp-admin/js/gallery.js | 2 +- wp-admin/media-upload.php | 4 +- wp-admin/wp-admin.css | 51 ++- wp-includes/js/swfobject.js | 5 + wp-includes/js/swfupload/handlers.dev.js | 94 +++-- wp-includes/js/swfupload/handlers.js | 2 +- .../plugins/swfupload.documentready.js | 102 ------ .../plugins/swfupload.graceful_degradation.js | 64 ---- .../js/swfupload/plugins/swfupload.queue.js | 51 ++- .../js/swfupload/plugins/swfupload.speed.js | 342 ++++++++++++++++++ .../swfupload/plugins/swfupload.swfobject.js | 7 +- wp-includes/js/swfupload/swfupload-all.js | 12 +- wp-includes/js/swfupload/swfupload.js | 251 ++++++++----- wp-includes/js/swfupload/swfupload.swf | Bin 11931 -> 12787 bytes wp-includes/js/swfupload/swfupload_f9.swf | Bin 9109 -> 0 bytes wp-includes/script-loader.php | 27 +- 19 files changed, 699 insertions(+), 414 deletions(-) create mode 100644 wp-includes/js/swfobject.js delete mode 100644 wp-includes/js/swfupload/plugins/swfupload.documentready.js delete mode 100644 wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js create mode 100644 wp-includes/js/swfupload/plugins/swfupload.speed.js delete mode 100644 wp-includes/js/swfupload/swfupload_f9.swf diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index 0eec887bde..9014254274 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -104,46 +104,6 @@ tr.image-size label { max-height: 40px; } -.filename.original { - float: left; -} - -.crunching { - display: block; - line-height: 32px; - text-align: right; - margin-right: 5px; -} - -button.dismiss { - position: absolute; - top: 7px; - right: 5px; - z-index: 4; - width: 8em; -} - -.file-error { - float: left; - font-weight: bold; - padding: 10px; -} - -.progress { - position: absolute; - top: 0; - left: 0; - width: 623px; - height: 36px; -} - -.bar { - width: 0; - height: 100%; - border-right-width: 3px; - border-right-style: solid; -} - #library-form .progress, #gallery-form .progress, #flash-upload-ui, @@ -229,7 +189,7 @@ abbr.required { margin: 0 1em 1em 0; } -#media-upload .media-upload-form p.ml-submit { +#media-upload p.ml-submit { padding: 1em 0; } @@ -252,7 +212,6 @@ abbr.required { } #media-upload .media-item { - position: relative; border-bottom-width: 1px; border-bottom-style: solid; min-height: 36px; @@ -264,11 +223,9 @@ abbr.required { } .filename { - float: left; line-height: 36px; - margin-left: 10px; + padding: 0 10px; overflow: hidden; - max-width: 430px; } #media-upload .describe { @@ -355,7 +312,9 @@ abbr.required { } .sorthelper { - z-index: -1; + height: 37px; + width: 623px; + display: block; } #gallery-settings th.label { diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index f5d7912d6c..529bc1eb4a 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -327,6 +327,8 @@ if ( is_string($content_func) ) $args = func_get_args(); $args = array_slice($args, 1); call_user_func_array($content_func, $args); + + do_action('admin_print_footer_scripts'); ?> @@ -1299,12 +1301,14 @@ jQuery(document).ready(function($){ @@ -1344,11 +1349,14 @@ SWFUpload.onload = function() {
-
+
+ +
+ +

-
@@ -1394,7 +1402,7 @@ function media_upload_type_form($type = 'file', $errors = null, $id = null) {
- +

+ +

- - + + | diff --git a/wp-admin/js/gallery.dev.js b/wp-admin/js/gallery.dev.js index 1489487fcf..2d62288022 100644 --- a/wp-admin/js/gallery.dev.js +++ b/wp-admin/js/gallery.dev.js @@ -7,7 +7,7 @@ jQuery(document).ready(function($) { placeholder: 'sorthelper', axis: 'y', distance: 2, - forcePlaceholderSize: true, + // forcePlaceholderSize: true, stop: function(e, ui) { // When an update has occurred, adjust the order for each item var all = $('#media-items').sortable('toArray'), len = all.length; @@ -33,16 +33,22 @@ jQuery(document).ready(function($) { if ( this.value == '0' || c ) this.value = ''; }); } - - toggleAll = function() { - $('a.toggle, table.slidetoggle').toggle(); - } $('#asc').click(function(){desc = false; sortIt(); return false;}); $('#desc').click(function(){desc = true; sortIt(); return false;}); $('#clear').click(function(){clearAll(1); return false;}); - $('#showall').click(function(){toggleAll();return false;}); - $('#hideall').click(function(){toggleAll();return false;}); + $('#showall').click(function(){ + $('#sort-buttons span a').toggle(); + $('a.describe-toggle-on').hide(); + $('a.describe-toggle-off, table.slidetoggle').show(); + return false; + }); + $('#hideall').click(function(){ + $('#sort-buttons span a').toggle(); + $('a.describe-toggle-on').show(); + $('a.describe-toggle-off, table.slidetoggle').hide(); + return false; + }); // initialize sortable gallerySortableInit(); diff --git a/wp-admin/js/gallery.js b/wp-admin/js/gallery.js index b735c1e0c1..9afb47430b 100644 --- a/wp-admin/js/gallery.js +++ b/wp-admin/js/gallery.js @@ -1 +1 @@ -jQuery(document).ready(function(c){var b,e,a,d=false;e=function(){b=c("#media-items").sortable({items:".media-item",placeholder:"sorthelper",axis:"y",distance:2,forcePlaceholderSize:true,stop:function(i,h){var g=c("#media-items").sortable("toArray"),f=g.length;c.each(g,function(k,l){var j=d?(f-k):(1+k);c("#"+l+" .menu_order input").val(j)})}})};sortIt=function(){var g=c(".menu_order_input"),f=g.length;g.each(function(j){var h=d?(f-j):(1+j);c(this).val(h)})};clearAll=function(f){f=f||0;c(".menu_order_input").each(function(){if(this.value=="0"||f){this.value=""}})};toggleAll=function(){c("a.toggle, table.slidetoggle").toggle()};c("#asc").click(function(){d=false;sortIt();return false});c("#desc").click(function(){d=true;sortIt();return false});c("#clear").click(function(){clearAll(1);return false});c("#showall").click(function(){toggleAll();return false});c("#hideall").click(function(){toggleAll();return false});e();clearAll();if(c("#media-items>*").length>1){a=wpgallery.getWin();c("#save-all, #gallery-settings").show();if(typeof a.tinyMCE!="undefined"&&a.tinyMCE.activeEditor&&!a.tinyMCE.activeEditor.isHidden()){wpgallery.mcemode=true;wpgallery.init()}else{c("#insert-gallery").show()}}});jQuery(window).unload(function(){tinymce=tinyMCE=wpgallery=null});var tinymce=null,tinyMCE,wpgallery;wpgallery={mcemode:false,editor:{},dom:{},is_update:false,el:{},I:function(a){return document.getElementById(a)},init:function(){var d=this,a,f,c,e,b=d.getWin();if(!d.mcemode){return}a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c*").length>1){a=wpgallery.getWin();c("#save-all, #gallery-settings").show();if(typeof a.tinyMCE!="undefined"&&a.tinyMCE.activeEditor&&!a.tinyMCE.activeEditor.isHidden()){wpgallery.mcemode=true;wpgallery.init()}else{c("#insert-gallery").show()}}});jQuery(window).unload(function(){tinymce=tinyMCE=wpgallery=null});var tinymce=null,tinyMCE,wpgallery;wpgallery={mcemode:false,editor:{},dom:{},is_update:false,el:{},I:function(a){return document.getElementById(a)},init:function(){var d=this,a,f,c,e,b=d.getWin();if(!d.mcemode){return}a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c + Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis + This software is released under the MIT License +*/ +var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("