Don't close thickbox when clicking outside the iframe while uploading, fixes #6883

git-svn-id: https://develop.svn.wordpress.org/trunk@12554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-12-27 21:03:54 +00:00
parent a464644c00
commit caddbabeec
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,4 @@
var topWin = window.dialogArguments || opener || parent || top;
function fileDialogStart() { function fileDialogStart() {
jQuery("#media-upload-error").empty(); jQuery("#media-upload-error").empty();
@ -24,6 +25,8 @@ function fileQueued(fileObj) {
} }
function uploadStart(fileObj) { function uploadStart(fileObj) {
if ( typeof topWin.tb_remove != 'undefined' )
topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
return true; return true;
} }
@ -43,6 +46,9 @@ function prepareMediaItem(fileObj, serverData) {
jQuery('.bar', item).remove(); jQuery('.bar', item).remove();
jQuery('.progress', item).hide(); jQuery('.progress', item).hide();
if ( typeof topWin.tb_remove != 'undefined' )
topWin.jQuery('#TB_overlay').click(topWin.tb_remove);
// Old style: Append the HTML returned by the server -- thumbnail and form inputs // Old style: Append the HTML returned by the server -- thumbnail and form inputs
if ( isNaN(serverData) || !serverData ) { if ( isNaN(serverData) || !serverData ) {
item.append(serverData); item.append(serverData);

File diff suppressed because one or more lines are too long

View File

@ -193,7 +193,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201'); $scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201');
} }
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091208'); $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091227');
$max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post; $max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;
if ( empty($max_upload_size) ) if ( empty($max_upload_size) )
$max_upload_size = __('not configured'); $max_upload_size = __('not configured');