Ticket #3191: 3191c.diff
File 3191c.diff, 13.3 KB (added by , 18 years ago) |
---|
-
wp-admin/upload-js.php
62 62 63 63 h += "<div id='upload-file'>" 64 64 h += "<div id='file-title'>" 65 h += "<h2><a href='" + this.currentImage.src + "' title='Direct Link to this file'>" + this.currentImage.title + "</a></h2>"; 66 h += "<span>[ "; 67 h += "<a href='" + this.currentImage.page + "' title='Permalink to the blog page for this file'>page link</a>" 65 if ( !this.currentImage.thumb ) 66 h += "<h2><a href='" + this.currentImage.src + "' title='Direct link to file'>" + this.currentImage.title + "</a></h2>"; 67 else 68 h += "<h2>" + this.currentImage.title + "</h2>"; 69 h += "<span>[ "; 70 h += "<a href='#' onclick='theFileList.editView(" + id + ")'>edit</a>" 68 71 h += ' | '; 69 h += "<a href='#' onclick='theFileList.editView(" + id + ")' title='Edit this file'>edit</a>"70 h += ' | ';71 72 if ( this.ID ) { 72 73 var params = $H(this.params); 73 74 params.ID = ''; … … 78 79 } 79 80 h += " ]</span>"; 80 81 h += '</div>' 81 h += "<div id='upload-file-view' class=' left'>";82 h += "<div id='upload-file-view' class='alignleft'>"; 82 83 if ( this.currentImage.thumb ) 83 h += "< img src='" + this.currentImage.thumb + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";84 h += "<a href='" + this.currentImage.src + "' title='Direct link to file'><img src='" + this.currentImage.thumb + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' /></a>"; 84 85 else 85 86 h += ' '; 86 87 h += "</div>"; 87 88 88 h += "<form name='uploadoptions' id='uploadoptions' class='left'>"; 89 h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>"; 90 h += "<table>"; 89 91 if ( this.currentImage.thumb ) { 90 h += "<input type='radio' name='display' value='thumb' checked='checked'>Display thumbnail</input><br />"; 91 h += "<input type='radio' name='display' value='full'>Display full-sized image</input><br /><br />"; 92 h += "<tr><th style='padding-bottom:.5em'>Show</th><td style='padding-bottom:.5em'>"; 93 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> thumbnail</label><br />"; 94 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> full size</label>"; 95 h += "</td></tr>"; 92 96 } 93 97 94 if ( this.currentImage.thumb ) { 95 h += "<input type='radio' name='link' value='none' checked='checked'>Do not link to this file</input><br />"; 96 h += "<input type='radio' name='link' value='file'>Link directly to this file</input><br />"; 97 h += "<input type='radio' name='link' value='page'>Link to this file's blog page</input><br />"; 98 } else { 99 h += "<input type='radio' name='link' value='file'>Link directly to this file</input><br />"; 100 h += "<input type='radio' name='link' value='page' checked='checked'>Link to this file's blog page</input><br />"; 101 } 98 h += "<tr><th>Link</th><td>"; 99 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> file</label><br />"; 100 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> page</label><br />"; 101 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> none</label>"; 102 h += "</td></tr>"; 102 103 103 h += "<input type='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='Send to editor' />"; 104 h += "<tr><td colspan='2'>"; 105 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='Send to editor »' />"; 106 h += "</td></tr></table>"; 104 107 h += "</form>"; 105 108 106 109 h += "</div>"; … … 116 119 117 120 h += "<form id='upload-file' method='post' action='upload.php?style=inline&tab=upload&post_id=" + this.postID + "'>"; 118 121 h += "<div id='file-title'>" 119 h += "<h2><a href='" + this.currentImage.src + "' title='Direct Link to this file'>" + this.currentImage.title + "</a></h2>"; 120 h += "<span>[ "; 121 h += "<a href='" + this.currentImage.page + "' title='Permalink to the blog page for this file'>page link</a>" 122 if ( !this.currentImage.thumb ) 123 h += "<h2><a href='" + this.currentImage.src + "' title='Direct link to file'>" + this.currentImage.title + "</a></h2>"; 124 else 125 h += "<h2>" + this.currentImage.title + "</h2>"; 126 h += "<span>[ "; 127 h += "<a href='#' onclick='theFileList.imageView(" + id + ")'>options</a>" 122 128 h += ' | '; 123 h += "<a href='#' onclick='theFileList.imageView(" + id + ")' title='View options for this file'>options</a>"124 h += ' | ';125 129 if ( this.ID ) { 126 130 var params = $H(this.params); 127 131 params.ID = ''; … … 132 136 } 133 137 h += " ]</span>"; 134 138 h += '</div>' 135 h += "<div id='upload-file-view' class=' left'>";139 h += "<div id='upload-file-view' class='alignleft'>"; 136 140 if ( this.currentImage.thumb ) 137 h += "< img src='" + this.currentImage.thumb + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";141 h += "<a href='" + this.currentImage.src + "' title='Direct link to file'><img src='" + this.currentImage.thumb + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' /></a>"; 138 142 else 139 143 h += ' '; 140 144 h += "</div>"; … … 151 155 h += "<input type='hidden' name='action' id='action-value' value='save' />"; 152 156 h += "<input type='hidden' name='ID' value='" + id + "' />"; 153 157 h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />"; 154 h += "<div id='submit'><input type='submit' value='Save' />";158 h += "<div class='submit'><input type='submit' value='Save' />"; 155 159 h += "<input type='button' name='delete' class='delete' value='Delete' onclick='theFileList.deleteFile(" + id + ");' />"; 156 160 h += "</div></td></tr></table></form>"; 157 161 -
wp-admin/upload.php
84 84 } 85 85 } 86 86 87 echo "\t<li class='$class left'><div><a href='$_href' title='{$tab_array[0]}'>{$tab_array[0]}</a>$page_links</div></li>\n";87 echo "\t<li class='$class alignleft'><div><a href='$_href' title='{$tab_array[0]}'>{$tab_array[0]}</a>$page_links</div></li>\n"; 88 88 } 89 89 unset($t, $tab_array, $href, $_href, $page_links, $total, $per, $class); 90 90 echo "</ul>\n\n"; 91 91 92 echo "<div id='upload-content' >\n";92 echo "<div id='upload-content' class='$tab'>\n"; 93 93 94 94 call_user_func( $wp_upload_tabs[$tab][2] ); 95 95 -
wp-admin/upload-rtl.css
7 7 border-left: 2px solid #448abd; 8 8 } 9 9 10 # file-title { margin: 0 15px 0 0;}10 #upload-file-view { 0 15px 0 0 } 11 11 12 #file-title { margin: 0 15px .2em 0; } 13 12 14 h2 { margin: 0 0 0 .2em; } 13 15 14 16 #upload-files li { margin: 0 15px 15px 0; } 15 17 16 t h { text-align: right; }18 table { float: right; } 17 19 18 .left, table { float: right; } 19 20 .right, #the-attachment-links { float: left; } 21 22 #submit input, #submit input:focus { 23 border-left: 0; 24 border-right-color: #ccc; 25 } 26 27 #submit input:active { 28 border-left: 0; 29 border-right-color: #999; 30 } 20 #the-attachment-links { float: left; } -
wp-admin/upload-functions.php
47 47 function wp_upload_view() { 48 48 global $style, $post_id; 49 49 $id = get_the_ID(); 50 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); 50 51 ?> 51 52 <div id="upload-file"> 52 53 <div id="file-title"> 53 <h2><a href="<?php the_guid(); ?>" title="Direct link to this file"><?php the_title(); ?></a></h2> 54 <h2><?php if ( !isset($attachment_data['width']) ) 55 echo "<a href='" . get_the_guid() . "' title='" . __('Direct link to file') . "'>"; 56 the_title(); 57 if ( !isset($attachment_data['width']) ) 58 echo '</a>'; 59 ?></h2> 54 60 <span><?php 55 61 echo '[ '; 56 echo '<a href="' . get_permalink() . '" title="' . ('Permalink to the blog page for this file') . '">' . __('page link') . '</a>';62 echo '<a href="' . get_permalink() . '">' . __('view') . '</a>'; 57 63 echo ' | '; 58 64 echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'edit' ), 1 ) . '" title="' . __('Edit this file') . '">' . __('edit') . '</a>'; 59 65 echo ' | '; … … 61 67 echo ' ]'; ?></span> 62 68 </div> 63 69 64 <div id="upload-file-view" class="left"> 65 <?php echo wp_upload_display( array(171, 128) ); ?> 70 <div id="upload-file-view" class="alignleft"> 71 <?php if ( isset($attachment_data['width']) ) 72 echo "<a href='" . get_the_guid() . "' title='" . __('Direct link to file') . "'>"; 73 echo wp_upload_display( array(171, 128) ); 74 if ( isset($attachment_data['width']) ) 75 echo '</a>'; ?> 66 76 </div> 67 77 <?php the_attachment_links( $id ); ?> 68 78 </div> … … 78 88 <?php 79 89 if ( $id ) : 80 90 $attachment = get_post_to_edit( $id ); 91 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); 81 92 ?> 82 93 <div id="file-title"> 83 <h2><a href="<?php the_guid(); ?>" title="Direct link to this file"><?php the_title(); ?></a></h2> 94 <h2><?php if ( !isset($attachment_data['width']) ) 95 echo "<a href='" . get_the_guid() . "' title='" . __('Direct link to file') . "'>"; 96 the_title(); 97 if ( !isset($attachment_data['width']) ) 98 echo '</a>'; 99 ?></h2> 84 100 <span><?php 85 101 echo '[ '; 86 echo '<a href="' . get_permalink() . '" title="' . ('Permalink to the blog page for this file') . '">' . __('page link') . '</a>';102 echo '<a href="' . get_permalink() . '">' . __('view') . '</a>'; 87 103 echo ' | '; 88 echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'view' ), 1 ) . '" title="' . __('View options for this file') . '">' . __('options') . '</a>';104 echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'view' ), 1 ) . '">' . __('options') . '</a>'; 89 105 echo ' | '; 90 106 echo '<a href="' . wp_specialchars( remove_query_arg( array('action','ID') ), 1 ) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>'; 91 107 echo ' ]'; ?></span> 92 108 </div> 93 109 94 <div id="upload-file-view" class="left"> 95 <?php echo wp_upload_display( array(171, 128) ); ?> 110 <div id="upload-file-view" class="alignleft"> 111 <?php if ( isset($attachment_data['width']) ) 112 echo "<a href='" . get_the_guid() . "' title='" . __('Direct link to file') . "'>"; 113 echo wp_upload_display( array(171, 128) ); 114 if ( isset($attachment_data['width']) ) 115 echo '</a>'; ?> 96 116 </div> 97 117 <?php endif; ?> 98 118 <table> … … 121 141 <input type="hidden" name="ID" value="<?php echo $id; ?>" /> 122 142 <?php endif; ?> 123 143 <?php wp_nonce_field( 'inlineuploading' ); ?> 124 <div id="submit">144 <div class="submit"> 125 145 <input type="submit" value="<?php $id ? _e('Save') : _e('Upload'); ?>" /> 126 146 <?php if ( $id ) : ?> 127 147 <input type="submit" name="delete" class="delete" value="<?php _e('Delete'); ?>" /> … … 293 313 294 314 echo "\t<li id='file-"; 295 315 the_ID(); 296 echo "' class=' left'>\n";316 echo "' class='alignleft'>\n"; 297 317 echo wp_upload_display( array(128,128), $href ); 298 318 echo "\t</li>\n"; 299 319 endwhile; -
wp-admin/upload.css
59 59 background: #dfe8f1; 60 60 } 61 61 62 #upload-file-view { padding: 0 15px; }62 form#upload-file input, form#upload-file textarea, div#upload-content.upload table { width: 100%; } 63 63 64 form#upload-file div.submit input { width: auto; } 65 66 #upload-file-view { padding: 0 0 0 15px; } 67 64 68 #file-title { 65 margin: 0 0 015px;69 margin: 0 0 .2em 15px; 66 70 padding: 0; 67 71 display: block; 68 72 } … … 72 76 padding: 0; 73 77 display: inline; 74 78 border: none; 79 color: #000; 75 80 font-weight: bold; 76 81 font-size: 1.4em; 77 82 line-height: 1.4em; … … 105 110 letter-spacing: 0; 106 111 } 107 112 108 #upload-files a.file-link img { 109 vertical-align: middle; 110 } 113 #upload-files a.file-link img { vertical-align: middle; } 111 114 112 115 #the-attachment-links { float: right; } 113 116 … … 116 119 overflow: hidden; 117 120 } 118 121 119 form table { float: none; }122 form table { float: none; padding: 0 15px; } 120 123 121 124 table { 122 125 float: left; 123 126 margin: 0; 124 padding: 0 15px;127 padding: 0; 125 128 } 126 129 127 .left { float: left; }130 th { vertical-align: text-top; } 128 131 129 .right { float: right; }130 131 .center { text-align: center; }132 133 th { text-align: left; }134 135 132 tr, td, th { 136 133 margin-top: 0; 137 134 padding-top: 0; 138 135 } 139 140 #submit {141 margin: 1px;142 width: 99%;143 }144 145 #submit input, #submit input:focus {146 background: url( images/fade-butt.png );147 border: 3px double #999;148 border-left-color: #ccc;149 border-top-color: #ccc;150 color: #333;151 padding: 0.25em;152 }153 154 #submit input:active {155 background: #f4f4f4;156 border: 3px double #ccc;157 border-left-color: #999;158 border-top-color: #999;159 }160 161 #submit input.delete:hover {162 background: #ce0000;163 color: #fff;164 }