Changeset 9564
- Timestamp:
- 11/08/2008 02:15:53 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-fresh.css
r9560 r9564 47 47 #poststuff .inside .approved { 48 48 color: green; 49 } 50 51 #postcustomstuff table { 52 border-color: #dfdfdf; 53 background-color: #F9F9F9; 54 } 55 56 #postcustomstuff thead th { 57 background-color: #F1F1F1; 58 } 59 60 #postcustomstuff table input, 61 #postcustomstuff table textarea { 62 border-color: #dfdfdf; 63 background-color: #fff; 49 64 } 50 65 … … 252 267 } 253 268 254 .button { 269 .button, 270 .submit input { 255 271 border-color: #DCDCDC; 256 272 color: #464646; … … 265 281 266 282 .button, 283 .submit input, 267 284 .button-secondary { 268 285 background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; … … 275 292 } 276 293 277 .button[disabled], .button:disabled { 294 .button[disabled], 295 .button:disabled { 278 296 background-color: #999; 279 297 } 280 298 281 299 .button:hover, 282 #edit-slug-buttons a.save:hover { 300 .submit input:hover, 301 #edit-slug-buttons a.save:hover, 302 #postcustomstuff .submit input:hover { 283 303 border-color: #535353; 284 304 } -
trunk/wp-admin/edit-form-advanced.php
r9557 r9564 356 356 ?> 357 357 <div id="postcustomstuff"> 358 <table cellpadding="3">359 358 <?php 360 359 $metadata = has_meta($post->ID); 361 360 list_meta($metadata); 362 ?> 363 364 </table> 365 <?php 366 meta_form(); 361 meta_form(); 367 362 ?> 368 363 <div id="ajax-response"></div> -
trunk/wp-admin/edit-page-form.php
r9557 r9564 288 288 ?> 289 289 <div id="postcustomstuff"> 290 <table cellpadding="3">291 290 <?php 292 291 $metadata = has_meta($post->ID); 293 292 list_meta($metadata); 294 ?> 295 296 </table> 297 <?php 298 meta_form(); 293 meta_form(); 299 294 ?> 300 295 <div id="ajax-response"></div> -
trunk/wp-admin/includes/template.php
r9557 r9564 2101 2101 function list_meta( $meta ) { 2102 2102 // Exit if no meta 2103 if (!$meta ) { 2104 echo '<tbody id="the-list" class="list:meta"><tr style="display: none;"><td> </td></tr></tbody>'; //TBODY needed for list-manipulation JS 2103 if ( ! $meta ) { 2104 echo ' 2105 <table id="list-table" style="display: none;"> 2106 <thead> 2107 <tr> 2108 <th class="left">' . __( 'Name' ) . '</th> 2109 <th>' . __( 'Value' ) . '</th> 2110 </tr> 2111 </thead> 2112 <tbody id="the-list" class="list:meta"> 2113 <tr><td></td></tr> 2114 </tbody> 2115 </table>'; //TBODY needed for list-manipulation JS 2105 2116 return; 2106 2117 } 2107 2118 $count = 0; 2108 2119 ?> 2120 <table id="list-table"> 2109 2121 <thead> 2110 2122 <tr> 2111 <th ><?php _e( 'Key' ) ?></th>2123 <th class="left"><?php _e( 'Name' ) ?></th> 2112 2124 <th><?php _e( 'Value' ) ?></th> 2113 <th colspan='2'><?php _e( 'Action' ) ?></th>2114 2125 </tr> 2115 2126 </thead> … … 2118 2129 foreach ( $meta as $entry ) 2119 2130 echo _list_meta_row( $entry, $count ); 2120 echo "\n\t</tbody>"; 2131 ?> 2132 </tbody> 2133 </table> 2134 <?php 2121 2135 } 2122 2136 … … 2162 2176 2163 2177 $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>"; 2164 $r .= "\n\t\t<td valign='top'><label class='hidden' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' /></td>"; 2165 $r .= "\n\t\t<td><label class='hidden' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>"; 2166 $r .= "\n\t\t<td style='text-align: center;'><input name='updatemeta' type='submit' tabindex='6' value='".attribute_escape(__( 'Update' ))."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$update_nonce updatemeta' /><br />"; 2167 $r .= "\n\t\t<input name='deletemeta[{$entry['meta_id']}]' type='submit' "; 2178 $r .= "\n\t\t<td class='left'><label class='hidden' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' />"; 2179 2180 $r .= "\n\t\t<div class='submit'><input name='deletemeta[{$entry['meta_id']}]' type='submit' "; 2168 2181 $r .= "class='delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta' tabindex='6' value='".attribute_escape(__( 'Delete' ))."' />"; 2182 $r .= "\n\t\t<input name='updatemeta' type='submit' tabindex='6' value='".attribute_escape(__( 'Update' ))."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$update_nonce updatemeta' /></div>"; 2169 2183 $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); 2170 $r .= "</td>\n\t</tr>"; 2184 $r .= "</td>"; 2185 2186 $r .= "\n\t\t<td><label class='hidden' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>"; 2171 2187 return $r; 2172 2188 } … … 2191 2207 ?> 2192 2208 <p><strong><?php _e( 'Add a new custom field:' ) ?></strong></p> 2193 <table id="newmeta" cellspacing="3" cellpadding="3"> 2194 <tr> 2195 <th colspan="2"><label <?php if ( $keys ) : ?> for="metakeyselect" <?php else : ?> for="metakeyinput" <?php endif; ?>><?php _e( 'Key' ) ?></label></th> 2209 <table id="newmeta"> 2210 <thead> 2211 <tr> 2212 <th class="left"><label for="metakeyselect"><?php _e( 'Name' ) ?></label></th> 2196 2213 <th><label for="metavalue"><?php _e( 'Value' ) ?></label></th> 2197 2214 </tr> 2198 <tr valign="top"> 2199 <td style="width: 18%;" class="textright"> 2215 </thead> 2216 2217 <tbody> 2218 <tr> 2219 <td id="newmetaleft" class="left"> 2200 2220 <?php if ( $keys ) : ?> 2201 2221 <select id="metakeyselect" name="metakeyselect" tabindex="7"> … … 2205 2225 foreach ( $keys as $key ) { 2206 2226 $key = attribute_escape( $key ); 2207 echo "\n \t<option value='$key'>$key</option>";2227 echo "\n<option value='$key'>$key</option>"; 2208 2228 } 2209 2229 ?> 2210 </select> <label for="metakeyinput"><?php _e( 'or' ); ?></label>2230 </select> 2211 2231 <?php endif; ?> 2232 <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" /> 2233 <a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;"> 2234 <span id="enternew"><?php _e('Enter new'); ?></span> 2235 <span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span> 2236 </a> 2212 2237 </td> 2213 <td>< input type="text" id="metakeyinput" name="metakeyinput" tabindex="7" /></td>2214 <td><textarea id="metavalue" name="metavalue" rows="3" cols="25" tabindex="8"></textarea></td>2215 </tr> 2216 <tr class="submit"><td colspan="3">2217 <?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?>2218 <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" /> 2238 <td><textarea id="metavalue" name="metavalue" rows="2" cols="25" tabindex="8"></textarea></td> 2239 </tr> 2240 2241 <tr><td colspan="2" class="submit"> 2242 <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" /> 2243 <?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?> 2219 2244 </td></tr> 2245 </tbody> 2220 2246 </table> 2221 2247 <?php -
trunk/wp-admin/js/page.js
r9491 r9564 106 106 return false; 107 107 }); 108 108 109 // Custom Fields 110 jQuery('#the-list').wpList( { addAfter: function( xml, s ) { 111 $('table#list-table').show(); 112 if ( jQuery.isFunction( autosave_update_post_ID ) ) { 113 autosave_update_post_ID(s.parsed.responses[0].supplemental.postid); 114 } 115 }, addBefore: function( s ) { 116 s.data += '&post_id=' + jQuery('#post_ID').val(); 117 return s; 118 } 119 }); 120 109 121 // preview 110 122 $('#post-preview').click(function(e){ -
trunk/wp-admin/js/post.js
r9542 r9564 290 290 // Custom Fields 291 291 jQuery('#the-list').wpList( { addAfter: function( xml, s ) { 292 $('table#list-table').show(); 292 293 if ( jQuery.isFunction( autosave_update_post_ID ) ) { 293 294 autosave_update_post_ID(s.parsed.responses[0].supplemental.postid); -
trunk/wp-admin/wp-admin.css
r9556 r9564 314 314 .button-primary, 315 315 .button-secondary, 316 .button-highlighted { 316 .button-highlighted, 317 #postcustomstuff .submit input { 317 318 font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 318 319 text-decoration: none; … … 516 517 } 517 518 518 .plugins p {519 }520 521 519 #login .fullwidth { 522 520 width: 320px; … … 544 542 } 545 543 546 #postcustomstuff .updatemeta, #postcustomstuff .deletemeta { 544 /* post meta postbox */ 545 #postcustomstuff table, 546 #postcustomstuff input, 547 #postcustomstuff textarea { 548 border-width: 1px; 549 border-style: solid; 550 -moz-border-radius: 3px; 551 -khtml-border-radius: 3px; 552 -webkit-border-radius: 3px; 553 border-radius: 3px; 554 } 555 556 #postcustomstuff .updatemeta, 557 #postcustomstuff .deletemeta { 547 558 margin: auto; 559 } 560 561 #postcustomstuff thead th { 562 padding: 5px 8px 8px; 563 } 564 565 #postcustom #postcustomstuff .submit, 566 #pagecustomdiv #postcustomstuff .submit { 567 border: 0 none; 568 float: none; 569 padding: 5px 8px; 570 } 571 572 #side-sortables #postcustom #postcustomstuff .submit, 573 #side-sortables #pagecustomdiv #postcustomstuff .submit { 574 padding: 0 5px; 575 } 576 577 #side-sortables #postcustom #postcustomstuff td.left input, 578 #side-sortables #pagecustomdiv #postcustomstuff td.left input { 579 margin: 3px 3px 0; 580 } 581 582 #side-sortables #postcustom #postcustomstuff #the-list textarea, 583 #side-sortables #pagecustomdiv #postcustomstuff #the-list textarea { 584 height: 85px; 585 margin: 3px; 548 586 } 549 587 … … 553 591 border-width: 1px; 554 592 border-style: solid; 555 } 556 557 #postcustomstuff table input, #postcustomstuff table textarea { 593 border-spacing: 0; 594 } 595 596 #postcustomstuff table input, 597 #postcustomstuff table select, 598 #postcustomstuff table textarea { 558 599 width: 95%; 600 margin: 8px 0 8px 8px; 601 } 602 603 #postcustomstuff th.left, 604 #postcustomstuff td.left { 605 width: 38%; 606 } 607 608 #postcustomstuff .submit input { 609 width: auto; 610 } 611 612 #postcustomstuff #newmeta .submit { 613 padding: 0 8px; 559 614 } 560 615 561 616 #postcustomstuff table #addmetasub { 562 617 width: auto; 618 } 619 620 #postcustomstuff #newmetaleft { 621 vertical-align: top; 622 } 623 624 #postcustomstuff #newmetaleft a { 625 padding: 0 10px; 626 text-decoration: none; 563 627 } 564 628 -
trunk/wp-includes/script-loader.php
r9561 r9564 177 177 'cancel' => __('Cancel'), 178 178 ) ); 179 $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug', 'settings-box'), '2008110 5' );179 $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug', 'settings-box'), '20081107' ); 180 180 $scripts->localize( 'post', 'postL10n', array( 181 181 'tagsUsed' => __('Tags used on this post:'), … … 196 196 'saveDraft' => __('Save Draft') 197 197 ) ); 198 $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', ' postbox', 'settings-box'), '20081103' );198 $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'wp-lists', 'postbox', 'settings-box'), '20081107' ); 199 199 $scripts->localize( 'page', 'postL10n', array( 200 200 'cancel' => __('Cancel'),
Note: See TracChangeset
for help on using the changeset viewer.