WordPress.org

Make WordPress Core

Changeset 8220


Ignore:
Timestamp:
07/01/2008 01:52:57 AM (12 years ago)
Author:
mdawaffe
Message:

crazyhorse: css tweaks so that most metaboxes are usable in main column or side column. unbreak add link and add page

Location:
branches/crazyhorse
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/css/colors-classic.css

    r8115 r8220  
    4444}
    4545
    46 ul#category-tabs li.ui-tabs-selected, li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title {
     46#postbody ul#category-tabs li.ui-tabs-selected, li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title {
    4747    background-color: #cfebf7;
    4848}
  • branches/crazyhorse/wp-admin/css/colors-fresh.css

    r8115 r8220  
    6161}
    6262
    63 ul#category-tabs li.ui-tabs-selected, .button-secondary, #quicktags, #login form .submit input {
     63#post-body ul#category-tabs li.ui-tabs-selected, .button-secondary, #quicktags, #login form .submit input {
    6464    background-color: #cee1ef !important;
    6565}
  • branches/crazyhorse/wp-admin/edit-link-form.php

    r8124 r8220  
    3131?>
    3232
    33 <?php echo $form ?>
    34 <?php wp_nonce_field($nonce_action); ?>
    35 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
    36 
    37 <div class="wrap">
    38 <h2><?php echo $heading; ?></h2>
    39 
    40 <div id="poststuff">
    41 
    42 <div class="submitbox" id="submitlink">
    43 
    44 <div id="previewview">
    45 <?php if ( !empty($link_id) ) { ?>
    46 <a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
    47 <?php } ?>
    48 </div>
    49 
    50 <div class="inside">
    51 <p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p>
    52 </div>
    53 
    54 <p class="submit">
    55 <input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" />
    56 <?php
    57 if ( ( 'edit' == $action) && current_user_can('manage_links') )
    58     echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link_id", 'delete-bookmark_' . $link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;link') . "</a>";
    59 ?>
    60 </p>
    61 
    62 <div class="side-info">
    63 <h5><?php _e('Related') ?></h5>
    64 
    65 <ul>
    66 <li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li>
    67 <li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li>
    68 <li><a href="link-import.php"><?php _e('Import Links') ?></a></li>
    69 <?php do_action('link_relatedlinks_list'); ?>
    70 </ul>
    71 </div>
    72 <?php do_action('submitlink_box'); ?>
    73 </div>
    74 
    75 <div id="post-body">
    76 <div id="namediv" class="stuffbox">
    77 <h3><label for="link_name"><?php _e('Name') ?></label></h3>
    78 <div class="inside">
    79     <input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br />
    80     <?php _e('Example: Nifty blogging software'); ?>
    81 </div>
    82 </div>
    83 
    84 <div id="addressdiv" class="stuffbox">
    85 <h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
    86 <div class="inside">
    87     <input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br />
    88     <?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?>
    89 </div>
    90 </div>
    91 
    92 <div id="descriptiondiv" class="stuffbox">
    93 <h3><label for="link_description"><?php _e('Description') ?></label></h3>
    94 <div class="inside">
    95     <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br />
    96     <?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?>
    97 </div>
    98 </div>
    99 
    10033<?php function link_categories_meta_box($link) { ?>
    10134<div id="category-adder" class="wp-hidden-children">
     
    12962}
    13063add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'link', 'normal', 'core');
    131 ?>
    132 
    133 <?php do_meta_boxes('link', 'normal', $link); ?>
    134 
    135 <h2><?php _e('Advanced Options'); ?></h2>
    136 
    137 <?php function link_target_meta_box($link) { ?>
     64
     65function link_target_meta_box($link) { ?>
    13866<fieldset><legend class="hidden"><?php _e('Target') ?></legend>
    13967<label for="link_target_blank" class="selectit">
     
    298226add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'advanced', 'core');
    299227
     228?>
     229
     230<?php echo $form ?>
     231<?php wp_nonce_field($nonce_action); ?>
     232<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
     233<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
     234
     235<div class="wrap">
     236<h2><?php echo $heading; ?></h2>
     237
     238<div id="poststuff">
     239
     240<div id="side-info-column">
     241<div class="submitbox" id="submitlink">
     242
     243<div id="previewview">
     244<?php if ( !empty($link_id) ) { ?>
     245<a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
     246<?php } ?>
     247</div>
     248
     249<div class="inside">
     250<p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p>
     251</div>
     252
     253<p class="submit">
     254<input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" />
     255<?php
     256if ( ( 'edit' == $action) && current_user_can('manage_links') )
     257    echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link_id", 'delete-bookmark_' . $link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;link') . "</a>";
     258?>
     259</p>
     260
     261</div>
     262
     263<div class="side-info">
     264<h5><?php _e('Related') ?></h5>
     265
     266<ul>
     267<li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li>
     268<li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li>
     269<li><a href="link-import.php"><?php _e('Import Links') ?></a></li>
     270<?php do_action('link_relatedlinks_list'); ?>
     271</ul>
     272</div>
     273<?php do_action('submitlink_box'); ?>
     274
     275<?php do_meta_boxes( 'link', 'side', $link ); ?>
     276
     277</div>
     278
     279<div id="post-body">
     280<div id="namediv" class="stuffbox">
     281<h3><label for="link_name"><?php _e('Name') ?></label></h3>
     282<div class="inside">
     283    <input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br />
     284    <?php _e('Example: Nifty blogging software'); ?>
     285</div>
     286</div>
     287
     288<div id="addressdiv" class="stuffbox">
     289<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
     290<div class="inside">
     291    <input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br />
     292    <?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?>
     293</div>
     294</div>
     295
     296<div id="descriptiondiv" class="stuffbox">
     297<h3><label for="link_description"><?php _e('Description') ?></label></h3>
     298<div class="inside">
     299    <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br />
     300    <?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?>
     301</div>
     302</div>
     303
     304<?php do_meta_boxes('link', 'normal', $link); ?>
     305
     306<h2><?php _e('Advanced Options'); ?></h2>
     307
     308<?php
     309
    300310do_meta_boxes('link', 'advanced', $link);
    301311
  • branches/crazyhorse/wp-admin/edit-page-form.php

    r8124 r8220  
    4040<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
    4141<?php endif; ?>
     42
     43<?php
     44
     45function page_custom_meta_box($post){
     46?>
     47<div id="postcustomstuff">
     48<table cellpadding="3">
     49<?php
     50$metadata = has_meta($post->ID);
     51list_meta($metadata);
     52?>
     53
     54</table>
     55<?php
     56    meta_form();
     57?>
     58<div id="ajax-response"></div>
     59</div>
     60<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
     61<?php
     62}
     63add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'advanced', 'core');
     64
     65function page_comments_status_meta_box($post){
     66?>
     67<input name="advanced_view" type="hidden" value="1" />
     68<p><label for="comment_status" class="selectit">
     69<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
     70<?php _e('Allow Comments') ?></label></p>
     71<p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p>
     72<p><?php _e('These settings apply to this page only. &#8220;Pings&#8221; are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
     73<?php
     74}
     75add_meta_box('pagecommentstatusdiv', __('Comments &amp; Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core');
     76
     77function page_password_meta_box($post){
     78?>
     79<p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
     80<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p>
     81<?php
     82}
     83add_meta_box('pagepassworddiv', __('Password Protect This Page'), 'page_password_meta_box', 'page', 'advanced', 'core');
     84
     85function page_slug_meta_box($post){
     86?>
     87<label class="hidden" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
     88<?php
     89}
     90add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'advanced', 'core');
     91
     92function page_parent_meta_box($post){
     93?>
     94<label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label>
     95<select name="parent_id" id="parent_id">
     96<option value='0'><?php _e('Main Page (no parent)'); ?></option>
     97<?php parent_dropdown($post->post_parent); ?>
     98</select>
     99<p><?php _e('You can arrange your pages in hierarchies, for example you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
     100<?php
     101}
     102add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'advanced', 'core');
     103
     104if ( 0 != count( get_page_templates() ) ) {
     105    function page_template_meta_box($post){
     106?>
     107<label class="hidden" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
     108<option value='default'><?php _e('Default Template'); ?></option>
     109<?php page_template_dropdown($post->page_template); ?>
     110</select>
     111<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them above.'); ?></p>
     112<?php
     113    }
     114    add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'advanced', 'core');
     115}
     116
     117function page_order_meta_box($post){
     118?>
     119<p><label class="hidden" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p>
     120<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it&#8217;ll be better in future releases.)'); ?></p>
     121<?php
     122}
     123add_meta_box('pageorderdiv', __('Page Order'), 'page_order_meta_box', 'page', 'advanced', 'core');
     124
     125
     126$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     127if ( $post->post_author && !in_array($post->post_author, $authors) )
     128    $authors[] = $post->post_author;
     129if ( $authors && count( $authors ) > 1 ) {
     130    function page_author_meta_box($post){
     131        global $current_user, $user_ID;
     132        $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     133        if ( $post->post_author && !in_array($post->post_author, $authors) )
     134            $authors[] = $post->post_author;
     135?>
     136<label class="hidden" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
     137<?php
     138    }
     139    add_meta_box('pageauthordiv', __('Page Author'), 'page_author_meta_box', 'page', 'advanced', 'core');
     140}
     141
     142
     143if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
     144function page_revisions_meta_box($post) {
     145    wp_list_post_revisions();
     146}
     147add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'advanced', 'core');
     148endif;
     149
     150?>
    42151
    43152<form name="post" action="page.php" method="post" id="post">
     
    72181
    73182<div id="poststuff">
     183
     184<div id="side-info-column">
    74185
    75186<div class="submitbox" id="submitpage">
     
    161272</p>
    162273
     274</div>
     275
    163276<div class="side-info">
    164277<h5><?php _e('Related') ?></h5>
     
    174287</div>
    175288<?php do_action('submitpage_box'); ?>
     289
     290<?php do_meta_boxes('page', 'side', $page); ?>
     291
    176292</div>
    177293
     
    199315<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
    200316<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
     317<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
    201318</div>
    202319
     
    207324<h2><?php _e('Advanced Options'); ?></h2>
    208325
    209 
    210 <?php
    211 function page_custom_meta_box($post){
    212 ?>
    213 <div id="postcustomstuff">
    214 <table cellpadding="3">
    215 <?php
    216 $metadata = has_meta($post->ID);
    217 list_meta($metadata);
    218 ?>
    219 
    220 </table>
    221 <?php
    222     meta_form();
    223 ?>
    224 <div id="ajax-response"></div>
    225 </div>
    226 <p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
    227 <?php
    228 }
    229 add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'advanced', 'core');
    230 
    231 function page_comments_status_meta_box($post){
    232 ?>
    233 <input name="advanced_view" type="hidden" value="1" />
    234 <p><label for="comment_status" class="selectit">
    235 <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
    236 <?php _e('Allow Comments') ?></label></p>
    237 <p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p>
    238 <p><?php _e('These settings apply to this page only. &#8220;Pings&#8221; are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
    239 <?php
    240 }
    241 add_meta_box('pagecommentstatusdiv', __('Comments &amp; Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core');
    242 
    243 function page_password_meta_box($post){
    244 ?>
    245 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
    246 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p>
    247 <?php
    248 }
    249 add_meta_box('pagepassworddiv', __('Password Protect This Page'), 'page_password_meta_box', 'page', 'advanced', 'core');
    250 
    251 function page_slug_meta_box($post){
    252 ?>
    253 <label class="hidden" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
    254 <?php
    255 }
    256 add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'advanced', 'core');
    257 
    258 function page_parent_meta_box($post){
    259 ?>
    260 <label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label>
    261 <select name="parent_id" id="parent_id">
    262 <option value='0'><?php _e('Main Page (no parent)'); ?></option>
    263 <?php parent_dropdown($post->post_parent); ?>
    264 </select>
    265 <p><?php _e('You can arrange your pages in hierarchies, for example you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
    266 <?php
    267 }
    268 add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'advanced', 'core');
    269 
    270 if ( 0 != count( get_page_templates() ) ) {
    271     function page_template_meta_box($post){
    272 ?>
    273 <label class="hidden" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
    274 <option value='default'><?php _e('Default Template'); ?></option>
    275 <?php page_template_dropdown($post->page_template); ?>
    276 </select>
    277 <p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them above.'); ?></p>
    278 <?php
    279     }
    280     add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'advanced', 'core');
    281 }
    282 
    283 function page_order_meta_box($post){
    284 ?>
    285 <p><label class="hidden" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p>
    286 <p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it&#8217;ll be better in future releases.)'); ?></p>
    287 <?php
    288 }
    289 add_meta_box('pageorderdiv', __('Page Order'), 'page_order_meta_box', 'page', 'advanced', 'core');
    290 
    291 
    292 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
    293 if ( $post->post_author && !in_array($post->post_author, $authors) )
    294     $authors[] = $post->post_author;
    295 if ( $authors && count( $authors ) > 1 ) {
    296     function page_author_meta_box($post){
    297         global $current_user, $user_ID;
    298         $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
    299         if ( $post->post_author && !in_array($post->post_author, $authors) )
    300             $authors[] = $post->post_author;
    301 ?>
    302 <label class="hidden" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
    303 <?php
    304     }
    305     add_meta_box('pageauthordiv', __('Page Author'), 'page_author_meta_box', 'page', 'advanced', 'core');
    306 }
    307 
    308 
    309 if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
    310 function page_revisions_meta_box($post) {
    311     wp_list_post_revisions();
    312 }
    313 add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'advanced', 'core');
    314 endif;
    315 
    316 do_meta_boxes('page', 'advanced', $post);
    317 ?>
     326<?php  do_meta_boxes('page', 'advanced', $post); ?>
    318327
    319328</div>
  • branches/crazyhorse/wp-admin/js/post.js

    r8219 r8220  
    7171    // postboxes
    7272    add_postbox_toggles('post');
    73 
    74     var postingMetaBox = false; // post once, not once per sortable
    75     jQuery('.meta-box-sortables').sortable( {
    76         connectWith: [ '.meta-box-sortables' ],
    77         handle: 'h3',
    78         update: function() {
    79             if ( postingMetaBox ) {
    80                 return;
    81             }
    82             postingMetaBox = true;
    83             var postVars = {
    84                 action: 'meta-box-order',
    85                 _ajax_nonce: jQuery('#meta-box-order-nonce').val(),
    86                 page: 'post'
    87             }
    88             jQuery('.meta-box-sortables').each( function() {
    89                 postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(',');
    90             } );
    91             jQuery.post( postboxL10n.requestFile, postVars, function() {
    92                 postingMetaBox = false;
    93             } );
    94         }
    95     } );
    9673
    9774    // Editable slugs
  • branches/crazyhorse/wp-admin/js/postbox.js

    r8219 r8220  
    22    jQuery('.postbox h3').before('<a class="togbox">+</a> ');
    33    jQuery('.postbox a.togbox').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } );
     4
     5    var postingMetaBox = false; // post once, not once per sortable
     6    jQuery('.meta-box-sortables').sortable( {
     7        connectWith: [ '.meta-box-sortables' ],
     8        handle: 'h3',
     9        update: function() {
     10            if ( postingMetaBox ) {
     11                return;
     12            }
     13            postingMetaBox = true;
     14            var postVars = {
     15                action: 'meta-box-order',
     16                _ajax_nonce: jQuery('#meta-box-order-nonce').val(),
     17                page: page
     18            }
     19            jQuery('.meta-box-sortables').each( function() {
     20                postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(',');
     21            } );
     22            jQuery.post( postboxL10n.requestFile, postVars, function() {
     23                postingMetaBox = false;
     24            } );
     25        }
     26    } );
    427}
    528
  • branches/crazyhorse/wp-admin/wp-admin.css

    r8219 r8220  
    939939}
    940940
    941 #tagsdiv #newtag {
     941#post-body #tagsdiv #newtag {
    942942    margin-right: 5px;
    943943    width: 16em;
     944}
     945
     946#side-info-column input#post_password, #side-info-column #tagsdiv #newtag {
     947    width: 94%
    944948}
    945949
     
    12361240/* Categories */
    12371241
    1238 #categorydiv #category-adder {
     1242#category-adder {
    12391243    margin-left: 120px;
    12401244    padding: 4px 0;
    12411245}
    12421246
    1243 #category-add input, #category-add select {
     1247#category-adder h4 {
     1248    margin: 0 0 8px;
     1249}
     1250
     1251#side-info-column #category-adder {
     1252    margin: 0;
     1253}
     1254
     1255#post-body #category-add input, #category-add select {
    12441256    width: 30%;
     1257}
     1258
     1259#side-info-column #category-add input, #category-add select {
     1260    width: 40%;
    12451261}
    12461262
     
    12491265}
    12501266
    1251 #categorydiv ul#category-tabs {
     1267#post-body ul#category-tabs {
    12521268    float: left;
    12531269    width: 120px;
     
    12581274}
    12591275
    1260 ul#category-tabs li {
     1276#post-body ul#category-tabs li {
    12611277    padding: 8px;
    12621278}
    12631279
    1264 ul#category-tabs li.ui-tabs-selected {
     1280#side-info-column ul#category-tabs li {
     1281    display: inline;
     1282    padding: 5px 5px 2px;
     1283}
     1284
     1285#post-body ul#category-tabs li.ui-tabs-selected {
    12651286    -moz-border-radius-topleft: 3px;
    12661287    -khtml-border-top-left-radius: 3px;
     
    12731294}
    12741295
    1275 ul#category-tabs li.ui-tabs-selected a {
     1296#side-info-column ul#category-tabs li.ui-tabs-selected {
     1297    -moz-border-radius-topleft: 3px;
     1298    -khtml-border-top-left-radius: 3px;
     1299    -webkit-border-top-left-radius: 3px;
     1300    border-top-left-radius: 3px;
     1301    -moz-border-radius-topright: 3px;
     1302    -khtml-border-top-right-radius: 3px;
     1303    -webkit-border-top-right-radius: 3px;
     1304    border-top-right-radius: 3px;
     1305    border: 1px solid;
     1306    border-bottom: none;
     1307    background-color: #fff;
     1308}
     1309
     1310#post-body ul#category-tabs li.ui-tabs-selected a {
    12761311    color: #333;
    12771312    font-weight: bold;
     
    12791314}
    12801315
    1281 div.ui-tabs-panel {
     1316#categorydiv div.ui-tabs-panel, #linkcategorydiv div.ui-tabs-panel {
     1317    padding: .5em .9em;
     1318}
     1319
     1320#post-body #categorydiv div.ui-tabs-panel, #post-body #linkcategorydiv div.ui-tabs-panel {
    12821321    margin: 0 5px 0 120px;
    1283     padding: .5em .9em;
    12841322    height: 10em;
    12851323    overflow: auto;
     
    12881326}
    12891327
    1290 #categorydiv ul {
     1328#side-info-column div.ui-tabs-panel {
     1329    border: 1px solid;
     1330}
     1331
     1332#categorydiv ul, #linkcategorydiv ul {
    12911333    list-style: none;
    12921334    padding: 0;
     
    12941336}
    12951337
    1296 #categorydiv ul.categorychecklist ul {
     1338#categorydiv ul.categorychecklist ul, #linkcategorydiv ul.categorychecklist ul {
    12971339    margin-left: 18px;
    12981340}
     
    13021344    padding: 0;
    13031345    line-height: 19px;
    1304 }
    1305 
    1306 #linkcategorydiv #category-adder {
    1307     margin-left: 120px;
    1308     padding: 4px 0;
    1309 }
    1310 
    1311 #category-adder h4 {
    1312     margin: 0;
    1313 }
    1314 
    1315 #linkcategorydiv ul#category-tabs {
    1316     float: left;
    1317     width: 120px;
    1318     text-align: right;
    1319     /* Negative margin for the sake of those without JS: all tabs display */
    1320     margin: 0 -120px 0 0;
    1321     padding: 0;
    1322 }
    1323 
    1324 #linkcategorydiv ul {
    1325     list-style: none;
    1326     padding: 0;
    1327     margin: 0;
    1328 }
    1329 
    1330 #linkcategorydiv ul.categorychecklist ul {
    1331     margin-left: 18px;
    13321346}
    13331347
  • branches/crazyhorse/wp-includes/script-loader.php

    r8219 r8220  
    127127        $scripts->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
    128128        $scripts->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
    129         $scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery'), '20080630' );
     129        $scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20080701' );
    130130        $scripts->localize( 'postbox', 'postboxL10n', array(
    131131            'requestFile' => admin_url('admin-ajax.php'),
     
    137137            'cancel' => __('Cancel'),
    138138        ) );
    139         $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'jquery-ui-sortable', 'wp-lists', 'postbox', 'slug'), '20080630' );
     139        $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080701' );
    140140        $scripts->localize( 'post', 'postL10n', array(
    141141            'tagsUsed' =>  __('Tags used on this post:'),
Note: See TracChangeset for help on using the changeset viewer.