wp/wp-includes/js/swfupload/handlers.js
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
    30 }
    30 }
    31 
    31 
    32 function uploadStart(fileObj) {
    32 function uploadStart(fileObj) {
    33 	try {
    33 	try {
    34 		if ( typeof topWin.tb_remove != 'undefined' )
    34 		if ( typeof topWin.tb_remove != 'undefined' )
    35 			topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove); 
    35 			topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
    36 	} catch(e){}
    36 	} catch(e){}
    37 
    37 
    38 	return true;
    38 	return true;
    39 }
    39 }
    40 
    40 
   210 	if ( items.not('.media-blank').length > 0 )
   210 	if ( items.not('.media-blank').length > 0 )
   211 		jQuery('.savebutton').show();
   211 		jQuery('.savebutton').show();
   212 	else
   212 	else
   213 		jQuery('.savebutton').hide();
   213 		jQuery('.savebutton').hide();
   214 
   214 
   215 	// Only show Gallery button when there are at least two files.
   215 	// Only show Gallery buttons when there are at least two files.
   216 	if ( items.length > 1 )
   216 	if ( items.length > 1 ) {
   217 		jQuery('.insert-gallery').show();
   217 		jQuery('.insert-gallery').show();
   218 	else
   218 	} else {
   219 		jQuery('.insert-gallery').hide();
   219 		jQuery('.insert-gallery').hide();
       
   220 	}
   220 }
   221 }
   221 
   222 
   222 function uploadSuccess(fileObj, serverData) {
   223 function uploadSuccess(fileObj, serverData) {
   223 	// if async-upload returned an error message, place it in the media item div and return
   224 	// if async-upload returned an error message, place it in the media item div and return
   224 	if ( serverData.match('media-upload-error') ) {
   225 	if ( serverData.match('media-upload-error') ) {