Ticket #6979: flash_degradation.diff
File flash_degradation.diff, 2.8 KB (added by , 16 years ago) |
---|
-
wp-includes/js/swfupload/handlers.js
206 206 } 207 207 208 208 function swfuploadPreLoad() { 209 return true; 209 jQuery('#' + swfu.customSettings.degraded_element_id).hide(); 210 jQuery('#' + swfu.customSettings.swfupload_element_id).show(); 210 211 } 211 212 212 213 function swfuploadLoadFailed() { 213 return true; 214 jQuery('#' + swfu.customSettings.swfupload_element_id).hide(); 215 jQuery('#' + swfu.customSettings.degraded_element_id).show(); 214 216 } 215 217 216 218 function uploadError(fileObj, error_code, message) { -
wp-admin/includes/media.php
1225 1225 button_height: "24", 1226 1226 button_width: "132", 1227 1227 button_image_url: '<?php echo includes_url('images/upload.png'); ?>', 1228 button_placeholder_id: " async-upload-wrap",1228 button_placeholder_id: "flash-browse-button", 1229 1229 upload_url : "<?php echo attribute_escape( $flash_action_url ); ?>", 1230 1230 flash_url : "<?php echo includes_url('js/swfupload/swfupload.swf'); ?>", 1231 1231 file_post_name: "async-upload", … … 1239 1239 "short" : "1" 1240 1240 }, 1241 1241 file_size_limit : "<?php echo wp_max_upload_size(); ?>b", 1242 swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available1243 degraded_element_id : "html-upload-ui", // when swfupload is unavailable1244 1242 file_dialog_start_handler : fileDialogStart, 1245 1243 file_queued_handler : fileQueued, 1246 1244 upload_start_handler : uploadStart, … … 1252 1250 file_dialog_complete_handler : fileDialogComplete, 1253 1251 swfupload_pre_load_handler: swfuploadPreLoad, 1254 1252 swfupload_load_failed_handler: swfuploadLoadFailed, 1255 1253 custom_settings : { 1254 degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable 1255 swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available 1256 }, 1256 1257 debug: false 1257 1258 }); 1258 1259 $("#flash-browse-button").bind( "click", function(){swfu.selectFiles();}); … … 1262 1263 1263 1264 <div id="flash-upload-ui"> 1264 1265 <?php do_action('pre-flash-upload-ui'); ?> 1265 <p><input id="flash-browse-button" type="button" value="<?php echo attribute_escape( __( 'Choose files to upload' ) ); ?>" class="button" /></p> 1266 <div id="flash-browse-button"></div> 1267 <p><?php _e( 'Choose files to upload' ); ?></p> 1266 1268 <?php do_action('post-flash-upload-ui'); ?> 1267 1269 <p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p> 1268 1270 </div> … … 1845 1847 echo '</p>'; 1846 1848 } 1847 1849 1848 add_action('post-flash-upload-ui', 'media_upload_flash_bypass');1849 1850 1850 /** 1851 1851 * {@internal Missing Short Description}} 1852 1852 *