Changeset 7160
- Timestamp:
- 03/05/2008 06:46:42 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
wp-admin/css/media.css (modified) (7 diffs)
-
wp-admin/includes/media.php (modified) (6 diffs)
-
wp-includes/js/swfupload/handlers.js (modified) (3 diffs)
-
wp-includes/script-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/media.css
r7100 r7160 2 2 background-color: #e4f2fd; 3 3 margin: 0; 4 padding: 1em 0.5em 0 0.5em;4 padding: 0 5px; 5 5 font-weight: bold; 6 6 position: relative; 7 7 border-bottom: 1px solid #c6d9e9; 8 height: 2.5em; 8 9 } 9 10 10 11 ul#sidemenu { 11 12 font-weight: normal; 12 margin: 0 15px;13 position: absolute; 14 right: 1em;13 margin: 0 5px; 14 position: absolute; 15 left: 0px; 15 16 bottom: -1px; 16 17 } … … 20 21 font-weight: bold; 21 22 color: #f00; 22 }23 24 .file-error {25 font-weight: bold;26 color: #f00;27 margin: 0 15px;28 23 } 29 24 … … 60 55 padding: 0; 61 56 } 62 /* 63 .media-upload-form button.button-ok { 64 float: right; 65 background-color: #ebebeb; 66 color: #1f4569; 67 border: none; 68 padding: 0.5em; 69 } 70 71 .media-upload-form a.button-cancel { 72 float: right; 73 background-color: #fff; 74 color: #9a9a9a; 75 font-size: 0.8em; 76 text-decoration: underline; 77 margin: 0.5em 1em; 78 } 79 */ 57 80 58 /* specific to the image upload form */ 81 59 .align .field label { … … 129 107 width: 623px; 130 108 position: relative; 131 } 132 span.filename { 133 position: absolute; 134 left: 46px; 109 min-height: 36px; 110 } 111 .filename { 112 line-height: 36px; 113 margin-left: 50px; 114 z-index: 2; 115 } 116 button.dismiss { 117 position: absolute; 118 top: 5px; 119 right: 5px; 120 z-index: 4; 121 } 122 .file-error { 123 margin: 0 0 5px 50px; 124 font-weight: bold; 125 color: #f00; 126 } 127 128 .progress { 129 position: absolute; 135 130 top: 0px; 136 line-height: 36px; 137 z-index: 2; 138 } 139 .progress { 131 left: 0px; 140 132 width: 623px; 141 133 height: 36px; … … 143 135 .bar { 144 136 width: 0px; 145 height: 36px;137 height: 100%; 146 138 background-color: #e8e8e8; 147 139 border-right: 3px solid #99d; … … 162 154 padding: 5px; 163 155 width: 100%; 156 clear: both; 164 157 } 165 158 .describe.startopen, .describe.startclosed { … … 202 195 cursor: pointer; 203 196 border: none; 204 z-index: 10; 197 z-index: 3; 198 height: 36px; 205 199 } 206 200 tr.align td.field { -
trunk/wp-admin/includes/media.php
r7151 r7160 271 271 if ( isset($_POST['insertonly']['align']) ) { 272 272 $align = attribute_escape($_POST['insertonly']['align']); 273 $class = " class='align -$align'";273 $class = " class='align$align'"; 274 274 } 275 275 $html = "<img src='$src' alt='$alt'$class />"; … … 603 603 foreach ( $attachments as $id => $attachment ) 604 604 if ( $item = get_media_item($id, isset($errors[$id]) ? $errors[$id] : null) ) 605 $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div>< span class='filename'></span><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>";605 $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div><div class='filename'></div><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>"; 606 606 607 607 return $output; … … 646 646 <a class='toggle describe-toggle-on' href='#'>$toggle_on</a> 647 647 <a class='toggle describe-toggle-off' href='#'>$toggle_off</a> 648 < span class='filename new'>$filename</span>648 <div class='filename new'>$filename</div> 649 649 <table class='slidetoggle describe $class'><tbody> 650 650 <tr> … … 731 731 } 732 732 733 function media_upload_header($title = false) { 734 if ( empty($title) ) 735 $title = __('Choose a File'); 733 function media_upload_header() { 736 734 ?> 737 735 <script type="text/javascript">post_id = <?php echo intval($_REQUEST['post_id']); ?>;</script> 738 736 <div id="media-upload-header"> 739 <h3><?php echo $title ?></h3>740 737 <?php the_media_upload_tabs(); ?> 741 738 </div> … … 857 854 858 855 function media_upload_gallery_form($errors) { 859 media_upload_header( __('Browse attached files'));856 media_upload_header(); 860 857 861 858 $post_id = intval($_REQUEST['post_id']); … … 895 892 global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; 896 893 897 media_upload_header( __('Browse Media Library'));894 media_upload_header(); 898 895 899 896 $post_id = intval($_REQUEST['post_id']); -
trunk/wp-includes/js/swfupload/handlers.js
r7100 r7160 12 12 // Get rid of unused form 13 13 jQuery('.media-blank').remove(); 14 // Collapse a single item 15 if ( jQuery('.type-form #media-items>*').length == 1 && jQuery('#media-items .hidden').length > 0 ) { 16 jQuery('.toggle').toggle(); 17 jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden'); 18 } 14 19 // Create a progress bar containing the filename 15 jQuery('#media-items'). prepend('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><span class="filename original">' + fileObj.name + '</span><div class="progress"><div class="bar"></div></div></div>');20 jQuery('#media-items').append('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><div class="filename original">' + fileObj.name + '</div><div class="progress"><div class="bar"></div></div></div>'); 16 21 17 22 // Disable the submit button … … 77 82 jQuery('#media-items .slidetoggle').slideDown(500).parent().eq(0).children('.toggle').toggle(); 78 83 jQuery('.type-form .slidetoggle').siblings().addClass('hidden'); 79 } else {80 jQuery('.type-form .slidetoggle').siblings().removeClass('hidden');81 84 } 82 85 … … 118 121 // file-specific message 119 122 function wpFileError(fileObj, message) { 120 jQuery('#media-item-' + fileObj.id + ' .filename').a ppend('<span class="file-error">'+message+'</span> <button type="button" class="button dismiss">'+swfuploadL10n.dismiss+'</button>');123 jQuery('#media-item-' + fileObj.id + ' .filename').after('<div class="file-error"><button type="button" class="button dismiss">'+swfuploadL10n.dismiss+'</button>'+message+'</div>').siblings('.progress').remove(); 121 124 jQuery('.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})}); 122 125 } -
trunk/wp-includes/script-loader.php
r7153 r7160 98 98 $this->localize( 'swfupload-handlers', 'swfuploadL10n', array( 99 99 'queue_limit_exceeded' => __('You have attempted to queue too many files.'), 100 'file_exceeds_size_limit' => __('This file is too big. See php.ini.'),100 'file_exceeds_size_limit' => sprintf(__('This file is too big. Your php.ini upload_max_filesize is %s.'), ini_get('upload_max_filesize')), 101 101 'zero_byte_file' => __('The file you selected is empty. Please select another file.'), 102 102 'invalid_filetype' => __('The file you choose is not an allowed file type.'),
Note: See TracChangeset
for help on using the changeset viewer.