Ticket #3191: 3191e.2.diff
File 3191e.2.diff, 13.4 KB (added by , 18 years ago) |
---|
-
wp-admin/wp-admin.css
186 186 border-style: none; 187 187 padding: 0px; 188 188 margin-bottom: 16px; 189 height: 1 6em;189 height: 17em; 190 190 width: 100%; 191 191 /* overflow-y: hidden;*/ 192 192 } -
wp-admin/admin-functions.php
1972 1972 1973 1973 ?> 1974 1974 <form id="the-attachment-links"> 1975 <table> 1975 <table class="data"> 1976 <col /> 1977 <col class="data-col" /> 1976 1978 <tr> 1977 <th scope="row"><?php _e(' Text linked to file') ?></th>1978 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly">< a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo basename($post->guid) ?></a></textarea></td>1979 <th scope="row"><?php _e('URL') ?></th> 1980 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><?php echo $post->guid ?></textarea></td> 1979 1981 </tr> 1980 <tr>1981 <th scope="row"><?php _e('Text linked to subpost') ?></th>1982 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php echo $post->post_title ?></a></textarea></td>1983 </tr>1984 1982 <?php if ( $icon ) : ?> 1985 1983 <tr> 1986 1984 <th scope="row"><?php _e('Thumbnail linked to file') ?></th> 1987 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo $icon ?></a></textarea></td>1985 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid; ?>" id="<?php echo $post->ID ?>"><?php echo $icon ?></a></textarea></td> 1988 1986 </tr> 1989 1987 <tr> 1990 <th scope="row"><?php _e('Thumbnail linked to subpost') ?></th>1988 <th scope="row"><?php _e('Thumbnail linked to page') ?></th> 1991 1989 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php echo $icon ?></a></textarea></td> 1992 1990 </tr> 1991 <?php else : ?> 1992 <tr> 1993 <th scope="row"><?php _e('Link to file') ?></th> 1994 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo basename($post->guid); ?></a></textarea></td> 1995 </tr> 1996 <tr> 1997 <th scope="row"><?php _e('Link to page') ?></th> 1998 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php the_title(); ?></a></textarea></td> 1999 </tr> 1993 2000 <?php endif; ?> 1994 2001 </table> 1995 2002 </form> -
wp-admin/upload-js.php
80 80 h += " ]</span>"; 81 81 h += '</div>' 82 82 h += "<div id='upload-file-view' class='alignleft'>"; 83 if ( this.currentImage.thumb ) 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>"; 85 else 83 if ( this.currentImage.thumb ) { 84 h += "<a href='" + this.currentImage.src + "' onclick='return false;' title='Direct link to file'>"; 85 h += "<img src='" + this.currentImage.thumb + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 86 h += "</a>"; 87 } else 86 88 h += ' '; 87 89 h += "</div>"; 88 90 89 h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>"; 90 h += "<table>"; 91 h += "<form name='uploadoptions' id='uploadoptions'>"; 92 93 h += "<table class='data'><col /><col class='data-col' />"; 91 94 if ( this.currentImage.thumb ) { 92 95 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>";96 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php _e('thumbnail'); ?></label><br />"; 97 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php _e('full size'); ?></label>"; 95 98 h += "</td></tr>"; 96 99 } 97 100 98 101 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 += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php _e('file'); ?></label><br />"; 103 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php _e('page'); ?></label><br />"; 104 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php _e('none'); ?></label>"; 102 105 h += "</td></tr>"; 103 106 104 h += "<tr ><tdcolspan='2'>";107 h += "<tr id='buttons'><th colspan='2'>"; 105 108 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='Send to editor »' />"; 106 h += "</t d></tr></table>";109 h += "</th></tr></table>"; 107 110 h += "</form>"; 108 111 109 112 h += "</div>"; … … 140 143 h += " ]</span>"; 141 144 h += '</div>' 142 145 h += "<div id='upload-file-view' class='alignleft'>"; 143 if ( this.currentImage.thumb ) 144 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>"; 145 else 146 if ( this.currentImage.thumb ) { 147 h += "<a href='" + this.currentImage.src + "' onclick='return false;' title='Direct link to file'>"; 148 h += "<img src='" + this.currentImage.thumb + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 149 h += "</a>"; 150 } else 146 151 h += ' '; 147 152 h += "</div>"; 148 153 149 154 150 h += "<table><tr>" 151 h += "<th scope='row'><label for='post_title'>Title:</label></th>"; 155 h += "<table class='data'><col /><col class='data-col' /><tr>" 156 h += "<th scope='row'><label for='url'>URL</label></th>"; 157 h += "<td><input type='text' id='url' readonly='readonly' value='" + this.currentImage.src + "' /></td>"; 158 h += "</tr><tr>"; 159 h += "<th scope='row'><label for='post_title'>Title</label></th>"; 152 160 h += "<td><input type='text' id='post_title' name='post_title' value='" + this.currentImage.title + "' /></td>"; 153 161 h += "</tr><tr>"; 154 h += "<th scope='row'><label for='post_content'>Description :</label></th>";162 h += "<th scope='row'><label for='post_content'>Description</label></th>"; 155 163 h += "<td><textarea name='post_content' id='post_content'>" + this.currentImage.description + "</textarea></td>"; 156 164 h += "</tr><tr id='buttons'><th></th><td>"; 157 165 h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />"; … … 159 167 h += "<input type='hidden' name='ID' value='" + id + "' />"; 160 168 h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />"; 161 169 h += "<div class='submit'><input type='submit' value='Save' />"; 162 h += "<input type='button' name='delete' class='delete' value='Delete ' onclick='theFileList.deleteFile(" + id + ");' />";170 h += "<input type='button' name='delete' class='delete' value='Delete Image' onclick='theFileList.deleteFile(" + id + ");' />"; 163 171 h += "</div></td></tr></table></form>"; 164 172 165 173 new Insertion.Top('upload-content', h); … … 223 231 win.tinyMCE.execCommand('mceInsertContent', false, h); 224 232 else 225 233 win.edInsertContent(win.edCanvas, h); 226 this.cancelView(); 234 if ( !this.ID ) 235 this.cancelView(); 227 236 return false; 228 237 }, 229 238 -
wp-admin/upload-functions.php
45 45 } 46 46 47 47 function wp_upload_view() { 48 global $style, $post_id ;48 global $style, $post_id, $style; 49 49 $id = get_the_ID(); 50 50 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); 51 51 ?> … … 68 68 </div> 69 69 70 70 <div id="upload-file-view" class="alignleft"> 71 <?php if ( isset($attachment_data['width']) )71 <?php if ( isset($attachment_data['width']) && 'inline' != $style ) 72 72 echo "<a href='" . get_the_guid() . "' title='" . __('Direct link to file') . "'>"; 73 73 echo wp_upload_display( array(171, 128) ); 74 if ( isset($attachment_data['width']) )74 if ( isset($attachment_data['width']) && 'inline' != $style ) 75 75 echo '</a>'; ?> 76 76 </div> 77 77 <?php the_attachment_links( $id ); ?> 78 78 </div> 79 <?php 79 <?php echo "<form action='' id='browse-form'><input type='hidden' id='nonce-value' value='" . wp_create_nonce( 'inlineuploading' ) . "' /></form>\n"; 80 80 } 81 81 82 82 function wp_upload_form() { … … 108 108 </div> 109 109 110 110 <div id="upload-file-view" class="alignleft"> 111 <?php if ( isset($attachment_data['width']) )111 <?php if ( isset($attachment_data['width']) && 'inline' != $style ) 112 112 echo "<a href='" . get_the_guid() . "' title='" . __('Direct link to file') . "'>"; 113 113 echo wp_upload_display( array(171, 128) ); 114 if ( isset($attachment_data['width']) )114 if ( isset($attachment_data['width']) && 'inline' != $style ) 115 115 echo '</a>'; ?> 116 116 </div> 117 117 <?php endif; ?> 118 <table> 119 <?php if ( !$id ): ?> 118 <table<?php if ( 'upload' != $tab ) echo ' class="data alignleft"'; ?>> 119 <col /> 120 <col class="data-col" /> 121 <?php if ( $id ): ?> 120 122 <tr> 121 <th scope="row"><label for="upload"><?php _e('File:'); ?></label></th> 123 <th scope="row"><label for="url"><?php _e('URL'); ?></label></th> 124 <td><input type="text" id="url" name="" value="<?php the_guid(); ?>" readonly="readonly" /></td> 125 </tr> 126 <?php else : ?> 127 <tr> 128 <th scope="row"><label for="upload"><?php _e('File'); ?></label></th> 122 129 <td><input type="file" id="upload" name="image" /></td> 123 130 </tr> 124 131 <?php endif; ?> 125 132 <tr> 126 <th scope="row"><label for="post_title"><?php _e('Title :'); ?></label></th>133 <th scope="row"><label for="post_title"><?php _e('Title'); ?></label></th> 127 134 <td><input type="text" id="post_title" name="post_title" value="<?php echo $attachment->post_title; ?>" /></td> 128 135 </tr> 129 136 <tr> 130 <th scope="row"><label for="post_content"><?php _e('Description :'); ?></label></th>137 <th scope="row"><label for="post_content"><?php _e('Description'); ?></label></th> 131 138 <td><textarea name="post_content" id="post_content"><?php echo $attachment->post_content; ?></textarea></td> 132 139 </tr> 133 140 <tr id="buttons"> … … 144 151 <div class="submit"> 145 152 <input type="submit" value="<?php $id ? _e('Save') : _e('Upload'); ?>" /> 146 153 <?php if ( $id ) : ?> 147 <input type="submit" name="delete" class="delete" value="<?php _e('Delete '); ?>" />154 <input type="submit" name="delete" class="delete" value="<?php _e('Delete Image'); ?>" /> 148 155 <?php endif; ?> 149 156 </div> 150 157 </td> … … 349 356 echo "<link rel='stylesheet' href='" . get_option('siteurl') . '/wp-admin/upload-rtl.css?version=' . get_bloginfo('version') . "' type='text/css' />\n"; 350 357 if ( 'inline' == @$_GET['style'] ) { 351 358 echo "<style type='text/css'>\n"; 352 echo "\tbody { height: 1 4em; overflow: hidden; }\n";359 echo "\tbody { height: 15em; overflow: hidden; }\n"; 353 360 echo "\t#upload-content { overflow-y: auto; }\n"; 354 361 echo "\t#upload-file { position: absolute; }\n"; 355 362 echo "</style>"; -
wp-admin/upload.css
59 59 background: #dfe8f1; 60 60 } 61 61 62 #upload-file input#url { background-color: #e6e6e6; } 63 64 textarea#gen-html { 65 width: 100%; 66 height: 100px; 67 } 68 69 62 70 form#upload-file input, form#upload-file textarea, div#upload-content.upload table { width: 100%; } 63 71 64 72 form#upload-file div.submit input { width: auto; } … … 114 122 115 123 #upload-files a.file-link img { vertical-align: middle; } 116 124 117 #the-attachment-links { float: right; } 118 119 #the-attachment-links textarea { 125 #the-attachment-links textarea, textarea#gen-html { 120 126 font-size: 10px; 121 127 overflow: hidden; 122 128 } 123 129 124 form table { float: none; padding: 0 15px; } 130 table.data { 131 float: left; 132 width: 99%; 133 margin: 0 0 0 -200px; 134 padding: 0 0 0 200px; 135 } 125 136 126 table { 127 float: left; 137 table { padding-right: 15px; } 138 139 th { 128 140 margin: 0; 129 padding: 0; 141 padding: 0 .5ex 0 15px; 142 text-align: right; 143 vertical-align: text-top; 130 144 } 131 145 132 t h { text-align: right; vertical-align: text-top; }146 tr#buttons th { text-align: left; } 133 147 134 tr, td , th{135 margin -top: 0;136 padding -top: 0;148 tr, td{ 149 margin: 0; 150 padding: 0; 137 151 } 152 153 col.data-col { width: 100%; }