Make sure Upload button always shows. Props filosofo. see #6979
git-svn-id: http://svn.automattic.com/wordpress/trunk@9465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7ed42f7885
commit
76a5770cc0
|
@ -1218,7 +1218,7 @@ function media_upload_form( $errors = null ) {
|
|||
<?php if ( $flash ) : ?>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
jQuery(function($){
|
||||
SWFUpload.onload = function() {
|
||||
swfu = new SWFUpload({
|
||||
button_text: '<span class="button"><?php _e('Upload'); ?></span>',
|
||||
button_text_style: '.button { text-align: center; font-weight: bold; font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif; }',
|
||||
|
@ -1256,7 +1256,7 @@ jQuery(function($){
|
|||
},
|
||||
debug: false
|
||||
});
|
||||
});
|
||||
};
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
|
|
@ -206,8 +206,11 @@ 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();
|
||||
jQuery('#' + swfu.customSettings.swfupload_element_id).show();
|
||||
// Doing this directly because jQuery().show() seems to have timing problems
|
||||
if ( swfupload_element && ! swfupload_element.style.display )
|
||||
swfupload_element.style.display = 'block';
|
||||
}
|
||||
|
||||
function swfuploadLoadFailed() {
|
||||
|
|
|
@ -109,7 +109,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'is_lighttpd_before_150' => is_lighttpd_before_150(),
|
||||
) );
|
||||
$scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2.2.0-20081031');
|
||||
$scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.2.0-20081031');
|
||||
$scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.2.0-20081101');
|
||||
// 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.'),
|
||||
|
|
Loading…
Reference in New Issue