Make uploader selection "sticky"

git-svn-id: http://svn.automattic.com/wordpress/trunk@10844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2009-03-27 08:36:51 +00:00
parent 3ca8d791a8
commit d2f10cfa07
4 changed files with 28 additions and 21 deletions

View File

@@ -206,12 +206,15 @@ function fileDialogComplete(num_files_queued) {
}
}
function swfuploadPreLoad() {
var swfupload_element = jQuery('#'+swfu.customSettings.swfupload_element_id).get(0);
jQuery('#' + swfu.customSettings.degraded_element_id).hide();
// Doing this directly because jQuery().show() seems to have timing problems
if ( swfupload_element && ! swfupload_element.style.display )
swfupload_element.style.display = 'block';
function swfuploadPreLoad(a) {
if ( typeof(a) == 'undefined' && typeof(getUserSetting) == 'function' )
a = getUserSetting('uploader');
if ( !a ) {
jQuery('#' + swfu.customSettings.swfupload_element_id).show();
jQuery('#' + swfu.customSettings.degraded_element_id).hide();
} else
swfuploadLoadFailed();
}
function swfuploadLoadFailed() {

File diff suppressed because one or more lines are too long

View File

@@ -178,7 +178,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'swfupload-queue', false, array('swfupload') );
}
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload'), '2.2.0-20081201');
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload'), '2.2.0-20090327');
// these error messages came from the sample swfupload js, they might need changing.
$scripts->localize( 'swfupload-handlers', 'swfuploadL10n', array(
'queue_limit_exceeded' => __('You have attempted to queue too many files.'),