Make WordPress Core

Changeset 8943


Ignore:
Timestamp:
09/21/2008 07:45:45 PM (16 years ago)
Author:
azaozz
Message:

Sytling and improvements to inline editing, see #6815

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r8917 r8943  
    716716    if ( is_array($hidden) )
    717717        update_usermeta($current_user->ID, "manage-$page-columns-hidden", $hidden);
     718break;
    718719case 'get-permalink':
    719720    check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
     
    728729    die(get_sample_permalink_html($post_id, $title, $slug));
    729730break;
    730 case 'inline-data':
    731     check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' );
    732 
    733     if ( isset($_POST['posts']) )
    734         get_inline_data( explode(',', $_POST['posts']) );
    735 
    736     die();
    737 break;
    738731case 'inline-save':
    739     check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' );
     732    check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
    740733   
    741734    if ( ! isset($_POST['post_ID']) )
     
    754747    }
    755748    die();
    756 break;
     749    break;
    757750case 'meta-box-order':
    758751    check_ajax_referer( 'meta-box-order' );
  • trunk/wp-admin/css/colors-classic.css

    r8909 r8943  
    807807}
    808808
    809 #replydiv {
     809#replydiv,
     810.inline-editor .quick-edit-div {
    810811    border-color: #EBEBEB #CCC #CCC #EBEBEB;
    811812    background-color: #fff;
     
    822823}
    823824
    824 /* table vim shorcuts */
     825/* table vim shortcuts */
    825826.vim-current {
    826827    background-color: #CFEBF7 !important;
     
    844845    background-color: #cee1ef;
    845846}
     847
     848/* inline editor */
     849.inline-editor input,
     850.inline-editor textarea {
     851    border-color: #ddd;
     852}
     853
     854.inline-editor div.title {
     855    background-color: #CFEBF7;
     856}
     857
     858.inline-editor ul.cat-checklist {
     859    background-color: #FFFFFF;
     860}
     861
     862.inline-editor .categories .catshow,
     863.inline-editor .categories .cathide {
     864    color: #2583AD;
     865}
     866
     867.inline-editor .quick-edit-save {
     868    background-color: #CFEBF7;
     869}
  • trunk/wp-admin/css/colors-fresh.css

    r8909 r8943  
    790790}
    791791
    792 #replydiv {
     792#replydiv,
     793.inline-editor .quick-edit-div {
    793794    border-color: #EBEBEB #CCC #CCC #EBEBEB;
    794795    background-color: #fff;
     
    805806}
    806807
    807 /* table vim shorcuts */
     808/* table vim shortcuts */
    808809.vim-current {
    809810    background-color: #E4F2FD !important;
     
    827828    background-color: #cee1ef;
    828829}
     830
     831/* inline editor */
     832.inline-editor input,
     833.inline-editor textarea {
     834    border-color: #ddd;
     835}
     836
     837.inline-editor div.title {
     838    background-color: #EAF3FA;
     839}
     840
     841.inline-editor ul.cat-checklist {
     842    background-color: #FFFFFF;
     843}
     844
     845.inline-editor .categories .catshow,
     846.inline-editor .categories .cathide {
     847    color: #2583AD;
     848}
     849
     850.inline-editor .quick-edit-save {
     851    background-color: #EAF3FA;
     852}
  • trunk/wp-admin/edit-pages.php

    r8923 r8943  
    190190if ($posts) {
    191191?>
    192 <table class="widefat">
     192<table class="widefat page">
    193193  <thead>
    194194  <tr>
  • trunk/wp-admin/edit-post-rows.php

    r8923 r8943  
    99if ( ! defined('ABSPATH') ) die();
    1010?>
    11 <table class="widefat">
     11<table class="widefat post">
    1212    <thead>
    1313    <tr>
  • trunk/wp-admin/edit.php

    r8883 r8943  
    186186<div class="alignleft">
    187187<select name="action">
    188 <option value="" selected><?php _e('Actions'); ?></option>
     188<option value="" selected="selected"><?php _e('Actions'); ?></option>
    189189<option value="edit"><?php _e('Edit'); ?></option>
    190190<option value="delete"><?php _e('Delete'); ?></option>
  • trunk/wp-admin/includes/template.php

    r8940 r8943  
    8787        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    8888        if ( $default_cat_id != $category->term_id )
    89             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("categories.php?action=delete&amp;cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n  'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     89            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("categories.php?action=delete&amp;cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    9090        $action_count = count($actions);
    9191        $i = 0;
     
    158158        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    159159        if ( $default_cat_id != $category->term_id )
    160             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n  'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     160            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    161161        $action_count = count($actions);
    162162        $i = 0;
     
    188188        switch ($column_name) {
    189189            case 'cb':
    190                $output .= "<th scope='row' class='check-column'>";
    191                if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
    192                 $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />";
    193                } else {
    194                 $output .= "&nbsp;";
    195                }
    196                $output .= "</th>";
    197                break;
     190                $output .= "<th scope='row' class='check-column'>";
     191                if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
     192                    $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />";
     193                } else {
     194                    $output .= "&nbsp;";
     195                }
     196                $output .= "</th>";
     197                break;
    198198            case 'name':
    199199                $output .= "<td $attributes>$edit</td>";
     
    250250
    251251        $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
    252         $output .= "\n<li id='category-$category->term_id'$class>" . '<label for="in-category-' . $category->term_id . '" class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . wp_specialchars( apply_filters('the_category', $category->name )) . '</label>';
     252        $output .= "\n<li id='category-$category->term_id'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . wp_specialchars( apply_filters('the_category', $category->name )) . '</label>';
    253253    }
    254254
     
    316316
    317317        <li id="<?php echo $id; ?>" class="popular-category">
    318             <label class="selectit" for="in-<?php echo $id; ?>">
     318            <label class="selectit">
    319319            <input id="in-<?php echo $id; ?>" type="checkbox" value="<?php echo (int) $category->term_id; ?>" />
    320320                <?php echo wp_specialchars( apply_filters( 'the_category', $category->name ) ); ?>
     
    370370
    371371        $name = apply_filters( 'term_name', $tag->name );
    372         $edit_link = "edit-tags.php?action=edit&amp;tag_ID=$tag->term_id"; 
     372        $edit_link = "edit-tags.php?action=edit&amp;tag_ID=$tag->term_id";
    373373        $out = '';
    374374        $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>';
     
    389389                    break;
    390390                case 'name':
    391                     $out .= '<td ' .  $attributes . '><strong><a class="row-title" href="' . $edit_link . '" title="' . attribute_escape(sprintf(__('Edit "%s"'), $name)) . '">' . $name . '</a></strong><br />';
     391                    $out .= '<td ' . $attributes . '><strong><a class="row-title" href="' . $edit_link . '" title="' . attribute_escape(sprintf(__('Edit "%s"'), $name)) . '">' . $name . '</a></strong><br />';
    392392                    $actions = array();
    393393                    $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    394                     $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this tag '%s'\n  'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     394                    $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this tag '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    395395                    $action_count = count($actions);
    396396                    $i = 0;
     
    572572
    573573function print_column_headers( $type ) {
    574     $columns = get_column_headers( $type ); 
     574    $columns = get_column_headers( $type );
    575575    $hidden = (array) get_user_option( "manage-$type-columns-hidden" );
    576576    $styles = array();
     
    603603        $style = ' style="' . $style . '"';
    604604?>
    605     <th scope="col"<?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th>
     605    <th scope="col" <?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th>
    606606<?php }
    607607}
    608608
    609609function inline_edit_row( $type ) {
    610     global $current_user;
    611 
    612     if ( 'post' == $type )
    613         $post = get_default_post_to_edit();
    614     else
    615         $post = get_default_page_to_edit(); 
    616 
    617     echo '<tr id="inline-edit" style="display: none">';
    618     $columns = $type == 'post' ? wp_manage_posts_columns() : wp_manage_pages_columns();
     610    global $current_user, $mode;
     611
     612    $is_page = 'page' == $type;
     613    if ( $is_page )
     614        $post = get_default_page_to_edit();
     615    else
     616        $post = get_default_post_to_edit();
     617
     618    $columns = $is_page ? wp_manage_pages_columns() : wp_manage_posts_columns();
    619619    $hidden = (array) get_user_option( "manage-$type-columns-hidden" );
     620    $hidden_count = empty($hidden[0]) ? 0 : count($hidden);
     621    $col_count = count($columns) - $hidden_count;
     622    $m = ( isset($mode) && 'excerpt' == $mode ) ? 'excerpt' : 'list';
     623    ?>
     624    <tr title="<?php _e('Double-click to cancel'); ?>" id="inline-edit" style="display: none"><td colspan="<?php echo $col_count; ?>">
     625    <?php
    620626    foreach($columns as $column_name=>$column_display_name) {
    621         $class = "class=\"$column_name column-$column_name\"";
     627        $class = "class=\"$column_name column-$column_name quick-edit-div\"";
    622628
    623629        $style = '';
     
    628634
    629635        switch($column_name) {
    630 
    631             case 'cb': ?>
    632               <th class="check-column"></th>
    633               <?php
    634               break;
     636            case 'cb':
     637                break;
    635638
    636639            case 'modified':
    637640            case 'date':
    638                 $attributes = 'class="date column-date"' . $style;
    639641            ?>
    640                 <td class="date"<?php echo $style ?>>
     642                <div <?php echo $attributes; ?> title="<?php _e('Timestamp'); ?>">
     643                    <div class="title"><?php _e('Timestamp'); ?></div>
     644                    <div class="in">
    641645                    <?php touch_time(1, 1, 4, 1); ?>
    642                 </td>
     646                    </div>
     647                </div>
    643648                <?php
    644649                break;
    645650
    646651            case 'title':
    647                 $attributes = "class=\"$type-title column-title\"" . $style;
    648             ?>
    649                 <td <?php echo $attributes ?>>
    650                     <?php wp_nonce_field( 'inlineeditnonce', 'inline_edit_nonce', false ) ?>
    651                     <div class="title">
    652                         <input type="text" name="post_title" class="title" value="" /><br />
    653                         <label><?php _e('Slug'); ?></label><input type="text" name="post_name" value="" class="slug" />
     652                $attributes = "class=\"$type-title column-title quick-edit-div\"" . $style; ?>
     653                <div <?php echo $attributes ?>>
     654                    <div class="title"><?php _e('Title'); ?></div>
     655                    <div class="in">
     656                    <label title="<?php _e('Title'); ?>"><input type="text" name="post_title" class="ptitle" value="" /></label><br />
     657                    <div class="slug">
     658                    <label title="<?php _e('Slug'); ?>"><?php _e('Slug'); ?><input type="text" name="post_name" value="" /></label></div>
    654659                    </div>
    655                     <?php if ($type == 'page'): ?>
    656                     <div class="other">
    657                         <label><?php _e('Parent'); ?></label>
    658                         <select name="post_parent">
    659                             <option value="0"><?php _e('Main Page (no parent)'); ?></option>
    660                             <?php parent_dropdown(); ?>
    661                         </select><br />
    662                         <label><?php _e('Template'); ?></label>
    663                         <select name="page_template">
    664                             <option value='default'><?php _e('Default Template'); ?></option>
    665                             <?php page_template_dropdown() ?>
    666                         </select>
     660                </div>
     661                <?php if ( $is_page ) { ?>
     662                <div class="parent quick-edit-div" title="<?php _e('Page Parent'); ?>">
     663                    <div class="title"><?php _e('Page Parent'); ?></div>
     664                    <div class="in">
     665                    <select name="post_parent">
     666                        <option value="0"><?php _e('Main Page (no parent)'); ?></option>
     667                        <?php parent_dropdown(); ?>
     668                    </select>
    667669                    </div>
    668                     <div class="more">
    669                         <label><?php _e('Order'); ?></label><input type="text" name="menu_order" value="<?php echo $post->menu_order ?>" />
    670                         <label><?php _e('Password'); ?></label><input type="text" name="post_password" value="<?php echo $post->post_password ?>" />     
     670                </div>
     671                <div class="template quick-edit-div" title="<?php _e('Page Template'); ?>">
     672                    <div class="title"><?php _e('Page Template'); ?></div>
     673                    <div class="in">
     674                    <select name="page_template">
     675                        <option value='default'><?php _e('Default Template'); ?></option>
     676                        <?php page_template_dropdown() ?>
     677                    </select>
    671678                    </div>
    672                     <?php endif; ?>
    673                     <div class="clear"></div>
    674                     <div class="save">
    675                     <?php
    676                     $actions = array();
    677                     $actions['save'] = '<a href="#">' . __('Save') . '</a>';
    678                     $actions['cancel'] = '<a href="#">' . __('Cancel') . '</a>';
    679                     $action_count = count($actions);
    680                     $i = 0;
    681                     foreach ( $actions as $action => $link ) {
    682                         ++$i;
    683                         ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
    684                         echo "<span class='$action'>$link$sep</span>";
    685                     }
    686                     ?>
     679                </div>
     680                <div class="order quick-edit-div" title="<?php _e('Page Order'); ?>">
     681                    <div class="title"><?php _e('Page Order'); ?></div>
     682                    <div class="in">
     683                    <input type="text" name="menu_order" value="<?php echo $post->menu_order ?>" />
    687684                    </div>
    688                 </td>
     685                </div>
     686                <?php }
     687
     688                break;
     689
     690            case 'categories': ?>
     691                <div <?php echo $attributes ?> title="<?php _e('Categories'); ?>">
     692                    <div class="title"><?php _e('Categories'); ?>
     693                    <span class="catshow"><?php _e('(expand)'); ?></span>
     694                    <span class="cathide" style="display:none;"><?php _e('(fold)'); ?></span></div>
     695                    <ul class="cat-checklist">
     696                        <?php wp_category_checklist(); ?>
     697                    </ul>
     698                </div>
    689699                <?php
    690700                break;
    691701
    692             case 'categories': ?>
    693                 <td <?php echo $attributes ?>>
    694                     <ul class="categories">
    695                         <?php wp_category_checklist() ?>
    696                     </ul>
    697                 </td>
     702            case 'tags': ?>
     703                <div <?php echo $attributes ?> title="<?php _e('Tags'); ?>">
     704                    <div class="title"><?php _e('Tags'); ?></div>
     705                    <div class="in">
     706                    <textarea cols="22" rows="1" type="text" name="tags_input" class="tags_input"></textarea>
     707                    </div>
     708                </div>
    698709                <?php
    699710                break;
    700711
    701             case 'tags': ?>
    702                 <td <?php echo $attributes ?>>
    703                     <textarea name="tags_input"></textarea>
    704                 </td>
     712            case 'comments':
     713                $attributes = 'class="comments column-comments num quick-edit-div"' . $style; ?>
     714                <div <?php echo $attributes ?> title="<?php _e('Comments and Pings'); ?>">
     715                    <div class="title"><?php _e('Comments and Pings'); ?></div>
     716                    <div class="in">
     717                    <label><input type="checkbox" name="comment_status" value="open" />
     718                    <?php _e('Allow Comments'); ?></label><br />
     719                    <label><input type="checkbox" name="ping_status" value="open" />
     720                    <?php _e('Allow Pings'); ?></label>
     721                    </div>
     722                </div>
    705723                <?php
    706724                break;
    707725
    708             case 'comments':
    709                 $attributes = 'class="comments column-comments num"' . $style;
    710              ?>
    711                 <td <?php echo $attributes ?>>
    712                     <input title="Allow Comments" type="checkbox" name="comment_status" value="open" /><br />
    713                     <input title="Allow Pings" type="checkbox" name="ping_status" value="open" />
    714                 </td>
     726            case 'author':
     727                $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     728                if ( $authors && count( $authors ) > 1 ) { ?>
     729                <div <?php echo $attributes ?> title="<?php _e('Author'); ?>">
     730                    <div class="title"><?php _e('Author'); ?></div>
     731                    <div class="in">
     732                    <?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'selected' => $post->post_author) ); ?>
     733                    </div>
     734                </div>
     735                <?php } ?>
     736
     737                <div class="password quick-edit-div" title="<?php _e('Password'); ?>">
     738                    <div class="title"><?php _e('Password'); ?></div>
     739                    <div class="in">
     740                    <input type="text" name="post_password" value="<?php echo $post->post_password ?>" />
     741                    <label title="<?php _e('Privacy'); ?>">
     742                    <input type="checkbox" name="keep_private" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php echo $is_page ? __('Keep this page private') : __('Keep this post private'); ?></label>
     743                    </div>
     744                </div>
    715745                <?php
    716746                break;
    717747
    718             case 'author': ?>
    719                 <td <?php echo $attributes ?>>
    720                     <?php
    721                     $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
    722                     if ( $authors && count( $authors ) > 1 ) {
    723                         wp_dropdown_users( array('include' => $authors, 'name' => 'post_author', 'class'=> 'author', 'selected' => $post->post_author) );
    724                     } else {
    725                         echo $current_user->user_nicename.'<input type="hidden" value="'.$post->post_author.'" class="author" />';
    726                     }
    727                     ?>
    728                 </td>
    729                 <?php
    730                 break;
    731 
    732748            case 'status': ?>
    733                 <td <?php echo $attributes ?>>
     749                <div <?php echo $attributes ?> title="<?php _e('Status'); ?>">
     750                    <div class="title"><?php _e('Status'); ?></div>
     751                    <div class="in">
    734752                    <select name="post_status">
    735                         <?php if ( current_user_can('publish_posts') ) : // Contributors only get "Unpublished" and "Pending Review" ?>
     753                        <?php if ( current_user_can('publish_posts') ) { // Contributors only get "Unpublished" and "Pending Review" ?>
    736754                        <option value='publish'><?php _e('Published') ?></option>
    737755                        <option value='future'><?php _e('Scheduled') ?></option>
    738                         <?php endif; ?>
     756                        <?php } ?>
    739757                        <option value='pending'><?php _e('Pending Review') ?></option>
    740758                        <option value='draft'><?php _e('Unpublished') ?></option>
    741759                    </select>
    742                     <?php if($type == 'page'): ?>
    743                     <br /><label><input type="checkbox" name="page_private" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></p>
    744                     <?php else: ?>
    745                     <?php if ( current_user_can( 'edit_others_posts' ) ) : ?>
    746                     <br /><label><input type="checkbox" name="sticky" value="sticky" /> <?php _e('Sticky') ?></label></p>
    747                     <?php endif; ?>
    748                     <?php endif; ?>
    749                 </td>
     760                    </div>
     761                </div>
     762
     763                <?php if ( current_user_can( 'edit_others_posts' ) && ! $is_page ) { ?>
     764                <div class="sticky quick-edit-div" <?php echo $style; ?> title="<?php _e('Sticky') ?>">
     765                    <div class="title"><?php _e('Sticky'); ?></div>
     766                    <div class="in">
     767                    <label title="<?php _e('Sticky') ?>">
     768                    <input type="checkbox" name="sticky" value="sticky" /> <?php _e('Stick this post to the front page') ?></label>
     769                    </div>
     770                </div>
     771                <?php }
     772                break;
     773
     774            case 'control_view': ?>
     775                <div><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e('View'); ?></a></div>
    750776                <?php
    751777                break;
    752778
    753             case 'control_view': ?>
    754                 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e('View'); ?></a></td>
     779            case 'control_edit': ?>
     780                <div><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></div>
    755781                <?php
    756782                break;
    757783
    758             case 'control_edit': ?>
    759                 <td><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     784            case 'control_delete': ?>
     785                <div><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>"; } ?></div>
    760786                <?php
    761787                break;
    762788
    763             case 'control_delete': ?>
    764                 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>"; } ?></td>
     789            default: ?>
     790                <div><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></div>
    765791                <?php
    766792                break;
    767 
    768             default: ?>
    769                 <td><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></td>
    770                 <?php
    771                 break;
    772         }
    773     }
    774 
    775     echo '</tr>';
    776 }
    777 
    778 function inline_save_row( $data ) { 
     793        }
     794    } ?>
     795
     796    <div class="clear"></div>
     797    <div class="quick-edit-save">
     798        <a accesskey="c" href="#inline-edit" title="<?php _e('Cancel'); ?>" class="button-secondary cancel"><?php _e('Cancel'); ?></a>
     799        <a accesskey="s" href="#inline-edit" title="<?php _e('Save'); ?>" class="button-secondary save"><?php _e('Save'); ?></a>
     800        <?php wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ) ?>
     801        <input type="hidden" name="post_view" value="<?php echo $m; ?>" />
     802    </div>
     803    </td></tr>
     804<?php
     805}
     806
     807function inline_save_row( $data ) {
    779808    // get the original post content
    780809    $post = get_post( $data['post_ID'], ARRAY_A );
     
    782811
    783812    // statuses
    784     if ( 'page' == $data['post_type'] && 'private' == $data['page_private'] )
     813    if ( 'private' == $data['keep_private'] )
    785814        $data['post_status'] = 'private';
    786     if ( empty($data['comment_status']) ) 
     815    if ( empty($data['comment_status']) )
    787816        $data['comment_status'] = 'closed';
    788817    if ( empty($data['ping_status']) )
     
    800829}
    801830
    802 // outputs XML of the post/page data ready for use in the inline editor
    803 // accepts array of post IDs
    804 function get_inline_data($posts) {
    805     global $post;
    806 
    807     header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
    808     echo "<?xml version='1.0' ?>\n";
    809     echo "<posts>\n";
    810 
    811     foreach ($posts as $ID) {
    812         $GLOBALS['post'] = get_post($ID);
    813         $GLOBALS['post_ID'] = $ID;
    814 
    815         if ( ($post->post_type == 'post' && !current_user_can('edit_post', $ID)) ||
    816                 ($post->post_type == 'page' && !current_user_can('edit_page', $ID)) ||
    817                 ($post->post_type != 'post' && $post->post_type != 'page'))
    818             continue;
    819 
    820         echo "  <post id='$ID'>\n";
    821         echo "    <post_title>" . wp_specialchars($post->post_title, 1) . "</post_title>\n";
    822         echo "    <post_name>$post->post_name</post_name>\n";
    823         echo "    <post_author>$post->post_author</post_author>\n";
    824         echo "    <comment_status>$post->comment_status</comment_status>\n";
    825         echo "    <ping_status>$post->ping_status</ping_status>\n";
    826         echo "    <post_status>$post->post_status</post_status>\n";
    827         echo "    <jj>" . mysql2date( 'd', $post->post_date ) . "</jj>\n";
    828         echo "    <mm>" . mysql2date( 'm', $post->post_date ) . "</mm>\n";
    829         echo "    <aa>" . mysql2date( 'Y', $post->post_date ) . "</aa>\n";
    830         echo "    <hh>" . mysql2date( 'H', $post->post_date ) . "</hh>\n";
    831         echo "    <mn>" . mysql2date( 'i', $post->post_date ) . "</mn>\n";
    832         if( $post->post_type == 'post' ) {
    833             echo '    <tags_input>' . wp_specialchars(get_tags_to_edit( $post->ID ), 1) . "</tags_input>\n";
    834             echo '    <post_category>' . implode( ',', wp_get_post_categories( $post->ID ) ) . "</post_category>\n";
    835             echo '    <sticky>' . (is_sticky($post->ID) ? 'sticky' : '') . "</sticky>\n";
    836         }
    837         if( $post->post_type == 'page' ) {
    838             echo "    <post_parent>$post->post_parent</post_parent>\n";
    839             echo '    <page_template>' . wp_specialchars(get_post_meta( $post->ID, '_wp_page_template', true ), 1) . "</page_template>\n";
    840             echo "    <post_password>" . wp_specialchars($post->post_password, 1) . "</post_password>\n";
    841             echo "    <menu_order>$post->menu_order</menu_order>\n";
    842         }
    843         echo "  </post>\n";
    844     }
    845 
    846     echo '</posts>';
     831// adds hidden fields with the data for use in the inline editor
     832function get_inline_data($post) {
     833
     834    if ( ! current_user_can('edit_' . $post->post_type, $post->ID) )
     835        return;
     836   
     837    $title = apply_filters( 'the_title', $post->post_title );
     838    if ( empty($title) )
     839        $title = __('(no title)');
     840
     841    echo '
     842<div id="inline_' . $post->ID . '">
     843    <input type="hidden" name="" class="post_title" value="' . $title . '" />
     844    <input type="hidden" name="" class="post_name" value="' . $post->post_name . '" />
     845    <input type="hidden" name="" class="post_author" value="' . $post->post_author . '" />
     846    <input type="hidden" name="" class="comment_status" value="' . $post->comment_status . '" />
     847    <input type="hidden" name="" class="ping_status" value="' . $post->ping_status . '" />
     848    <input type="hidden" name="" class="post_status" value="' . $post->post_status . '" />
     849    <input type="hidden" name="" class="jj" value="' . mysql2date( 'd', $post->post_date ) . '" />
     850    <input type="hidden" name="" class="mm" value="' . mysql2date( 'm', $post->post_date ) . '" />
     851    <input type="hidden" name="" class="aa" value="' . mysql2date( 'Y', $post->post_date ) . '" />
     852    <input type="hidden" name="" class="hh" value="' . mysql2date( 'H', $post->post_date ) . '" />
     853    <input type="hidden" name="" class="mn" value="' . mysql2date( 'i', $post->post_date ) . '" />
     854    <input type="hidden" name="" class="post_password" value="' . wp_specialchars($post->post_password, 1) . '" />';
     855
     856    if( $post->post_type == 'page' )
     857        echo '
     858    <input type="hidden" name="" class="post_parent" value="' . $post->post_parent . '" />
     859    <input type="hidden" name="" class="page_template" value="' . wp_specialchars(get_post_meta( $post->ID, '_wp_page_template', true ), 1) . '" />
     860    <input type="hidden" name="" class="menu_order" value="' . $post->menu_order . '" />';
     861   
     862    if( $post->post_type == 'post' )
     863        echo '
     864    <input type="hidden" name="" class="tags_input" value="' . wp_specialchars( str_replace( ',', ', ', get_tags_to_edit($post->ID) ), 1) . '" />
     865    <input type="hidden" name="" class="post_category" value="' . implode( ',', wp_get_post_categories( $post->ID ) ) . '" />
     866    <input type="hidden" name="" class="sticky" value="' . (is_sticky($post->ID) ? 'sticky' : '') . '" />';
     867       
     868    echo '</div>';
    847869}
    848870
     
    875897function _post_row($a_post, $pending_comments, $mode) {
    876898    global $post;
    877     static $class;
     899    static $rowclass;
    878900
    879901    $global_post = $post;
     
    881903    setup_postdata($post);
    882904
    883     $class = 'alternate' == $class ? '' : 'alternate';
     905    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    884906    global $current_user;
    885907    $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
     
    889911        $title = __('(no title)');
    890912?>
    891     <tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
     913    <tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $rowclass . ' author-' . $post_owner . ' status-' . $post->post_status ); ?> iedit' valign="top">
    892914<?php
    893915    $posts_columns = wp_manage_posts_columns();
     
    935957            }
    936958
    937             if ( 'excerpt' == $mode ) { ?>
    938         <td <?php echo $attributes ?>><?php echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode) ?></td>
    939         <?php } else { ?>
    940         <td <?php echo $attributes ?>><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) ?></abbr></td>
    941         <?php }
     959            echo '<td ' . $attributes . '>';
     960            if ( 'excerpt' == $mode )
     961                echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
     962            else
     963                echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
     964           
     965            echo '</td>';
    942966        break;
    943967
     
    955979            $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
    956980            $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
    957             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     981            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    958982            if ( in_array($post->post_status, array('pending', 'draft')) )
    959983                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
     
    967991                echo "<span class='$action'>$link$sep</span>";
    968992            }
     993
     994            get_inline_data($post);
    969995        ?>
    970996        </td>
     
    10891115function display_page_row( $page, $level = 0 ) {
    10901116    global $post;
    1091     static $class;
     1117    static $rowclass;
    10921118
    10931119    $post = $page;
     
    10971123    $pad = str_repeat( '&#8212; ', $level );
    10981124    $id = (int) $page->ID;
    1099     $class = ('alternate' == $class ) ? '' : 'alternate';
     1125    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    11001126    $posts_columns = wp_manage_pages_columns();
    11011127    $hidden = (array) get_user_option( 'manage-page-columns-hidden' );
     
    11041130        $title = __('(no title)');
    11051131?>
    1106   <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
    1107 
    1108 
    1109  <?php
     1132<tr id="page-<?php echo $id; ?>" class="<?php echo $rowclass; ?> iedit">
     1133<?php
    11101134
    11111135foreach ($posts_columns as $column_name=>$column_display_name) {
     
    11641188        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    11651189        $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
    1166         $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     1190        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    11671191        if ( in_array($post->post_status, array('pending', 'draft')) )
    11681192            $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
     
    11761200            echo "<span class='$action'>$link$sep</span>";
    11771201        }
    1178         ?>
    1179         </td>
    1180         <?php
     1202       
     1203        get_inline_data($post);
     1204        echo '</td>';
    11811205        break;
    11821206
     
    12371261    }
    12381262}
    1239  ?>
    1240 
    1241    </tr>
     1263?>
     1264
     1265</tr>
    12421266
    12431267<?php
     
    12661290     * If searching, ignore hierarchy and treat everything as top level
    12671291     */
    1268     if ( empty($_GET['s']) )  {
     1292    if ( empty($_GET['s']) ) {
    12691293
    12701294        $top_level_pages = array();
    1271         $children_pages  = array();
     1295        $children_pages = array();
    12721296
    12731297        foreach ( $pages as $page ) {
     
    13801404        $short_url = substr( $short_url, 0, -1 );
    13811405    if ( strlen( $short_url ) > 35 )
    1382         $short_url =  substr( $short_url, 0, 32 ).'...';
     1406        $short_url = substr( $short_url, 0, 32 ).'...';
    13831407    $numposts = get_usernumposts( $user_object->ID );
    13841408    if ( current_user_can( 'edit_user', $user_object->ID ) ) {
     
    13911415        $actions = array();
    13921416        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    1393         $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this user '%s'\n  'Cancel' to stop, 'OK' to delete."), $user_object->user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
     1417        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this user '%s'\n 'Cancel' to stop, 'OK' to delete."), $user_object->user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    13941418        $action_count = count($actions);
    13951419        $i = 0;
     
    15121536        $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $comment->comment_date );
    15131537
    1514     $delete_url    = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
    1515     $approve_url   = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );
     1538    $delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
     1539    $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );
    15161540    $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) );
    1517     $spam_url      = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
     1541    $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
    15181542
    15191543?>
    1520   <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $the_comment_status; ?>'>
     1544<tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $the_comment_status; ?>'>
    15211545<?php if ( $checkbox ) : ?>
    1522     <td class="check-column"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>
     1546    <td class="check-column"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>
    15231547<?php endif; ?>
    1524     <td class="comment-column">
    1525     <?php if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?>
    1526    
     1548    <td class="comment-column">
     1549    <?php if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?>
     1550
    15271551<?php
    15281552    $actions = array();
    15291553
    15301554    if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    1531         $actions['approve']   = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
     1555        $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    15321556        $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    15331557        if ( $comment_status ) { // not looking at all comments
     
    15411565        }
    15421566        if ( 'spam' != $the_comment_status )
    1543             $actions['spam']      = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>';
     1567            $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>';
    15441568        $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
    15451569        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
     
    15651589    }
    15661590    ?>
    1567     </td>
     1591    </td>
    15681592    <td class="author-column">
    15691593        <strong><?php comment_author(); ?></strong><br />
    1570         <?php if ( !empty($author_url) ) : ?>
    1571         <a href="<?php echo $author_url ?>"><?php echo $author_url_display; ?></a><br />
    1572         <?php endif; ?>
    1573         <?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?>
    1574         <?php if ( !empty($comment->comment_author_email) ): ?>
    1575         <?php comment_author_email_link() ?><br />
    1576         <?php endif; ?>
    1577         <a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=detail"><?php comment_author_IP() ?></a>
    1578         <?php endif; //current_user_can?>   
     1594        <?php if ( !empty($author_url) ) : ?>
     1595        <a href="<?php echo $author_url ?>"><?php echo $author_url_display; ?></a><br />
     1596        <?php endif; ?>
     1597        <?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?>
     1598        <?php if ( !empty($comment->comment_author_email) ): ?>
     1599        <?php comment_author_email_link() ?><br />
     1600        <?php endif; ?>
     1601        <a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=detail"><?php comment_author_IP() ?></a>
     1602        <?php endif; //current_user_can?>
    15791603    </td>
    1580     <td class="date-column"><?php comment_date(__('Y/m/d \a\t g:ia')); ?></td>
     1604    <td class="date-column"><?php comment_date(__('Y/m/d \a\t g:ia')); ?></td>
    15811605<?php if ( 'single' !== $mode ) : ?>
    1582     <td class="response-column">
    1583     "<?php echo $post_link ?>" <?php echo sprintf('(%s comments)', $post->comment_count); ?><br />
    1584     <?php echo get_the_time(__('Y/m/d \a\t g:ia')); ?>
    1585     </td>
     1606    <td class="response-column">
     1607    "<?php echo $post_link ?>" <?php echo sprintf('(%s comments)', $post->comment_count); ?><br />
     1608    <?php echo get_the_time(__('Y/m/d \a\t g:ia')); ?>
     1609    </td>
    15861610<?php endif; ?>
    1587   </tr>
     1611</tr>
    15881612    <?php
    15891613}
     
    15941618    // allow plugin to replace the popup content
    15951619    $content = apply_filters( 'wp_comment_reply', '', array('position'=>$position, 'checkbox'=>$checkbox, 'mode'=>$mode) );
    1596    
     1620
    15971621    if ( ! empty($content) ) {
    15981622        echo $content;
     
    16071631    <button id="back-button" onclick="commentReply.back();" class="button"><?php _e('Go back'); ?></button></p>
    16081632    </div>
    1609    
     1633
    16101634    <div id="replydiv" style="display:none;">
    16111635    <p id="replyhandle"><?php _e('Reply'); ?></p>
     
    17001724    }
    17011725
    1702     $entry['meta_key']   = attribute_escape($entry['meta_key']);
     1726    $entry['meta_key'] = attribute_escape($entry['meta_key']);
    17031727    $entry['meta_value'] = htmlspecialchars($entry['meta_value']); // using a <textarea />
    17041728    $entry['meta_id'] = (int) $entry['meta_id'];
     
    17931817    $month .= '</select>';
    17941818
    1795     $day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off"  />';
    1796     $year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="5"' . $tab_index_attribute . ' autocomplete="off"  />';
    1797     $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off"  />';
    1798     $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off"  />';
     1819    $day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     1820    $year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="5"' . $tab_index_attribute . ' autocomplete="off" />';
     1821    $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     1822    $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    17991823    printf(_c('%1$s%2$s, %3$s @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute);
    18001824
    18011825    if ( $multi ) return;
    1802    
     1826
    18031827    echo "\n\n";
    18041828    foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit )
     
    18921916    <tr>
    18931917        <th scope="row"><?php _e( 'Link to file' ) ?></th>
    1894         <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>" class="attachmentlink"><?php echo basename( wp_get_attachment_url() );  ?></a></textarea></td>
     1918        <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>" class="attachmentlink"><?php echo basename( wp_get_attachment_url() ); ?></a></textarea></td>
    18951919    </tr>
    18961920    <tr>
     
    19782002 * @param string $id String for use in the 'id' attribute of tags.
    19792003 * @param string $title Title of the meta box
    1980  * @param string $callback Function that fills the box with the desired content.  The function should echo its output.
     2004 * @param string $callback Function that fills the box with the desired content. The function should echo its output.
    19812005 * @param string $page The type of edit page on which to show the box (post, page, link)
    19822006 * @param string $context The context within the page where the boxes should show ('normal', 'advanced')
     
    19862010    global $wp_meta_boxes;
    19872011
    1988     if  ( !isset($wp_meta_boxes) )
     2012    if ( !isset($wp_meta_boxes) )
    19892013        $wp_meta_boxes = array();
    19902014    if ( !isset($wp_meta_boxes[$page]) )
     
    20132037        if ( empty($priority) ) {
    20142038            $priority = $a_priority;
    2015         // else if we're adding to the sorted priortiy, we don't know the title or callback.  Glab them from the previously added context/priority.
     2039        // else if we're adding to the sorted priortiy, we don't know the title or callback. Glab them from the previously added context/priority.
    20162040        } elseif ( 'sorted' == $priority ) {
    20172041            $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
     
    20442068
    20452069    $i = 0;
    2046     do { 
    2047         // Grab the ones the user has manually sorted.  Pull them out of their previous context/priority and into the one the user chose
     2070    do {
     2071        // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
    20482072        if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
    20492073            foreach ( $sorted as $box_context => $ids )
     
    20952119    global $wp_meta_boxes;
    20962120
    2097     if  ( !isset($wp_meta_boxes) )
     2121    if ( !isset($wp_meta_boxes) )
    20982122        $wp_meta_boxes = array();
    20992123    if ( !isset($wp_meta_boxes[$page]) )
     
    21382162 * @param string $id String for use in the 'id' attribute of tags.
    21392163 * @param string $title Title of the section
    2140  * @param string $callback Function that fills the section with the desired content.  The function should echo its output.
     2164 * @param string $callback Function that fills the section with the desired content. The function should echo its output.
    21412165 * @param string $page The type of settings page on which to show the section (general, reading, writing, ...)
    21422166 */
     
    21442168    global $wp_settings_sections;
    21452169
    2146     if  ( !isset($wp_settings_sections) )
     2170    if ( !isset($wp_settings_sections) )
    21472171        $wp_settings_sections = array();
    21482172    if ( !isset($wp_settings_sections[$page]) )
     
    21612185 * @param string $id String for use in the 'id' attribute of tags.
    21622186 * @param string $title Title of the field
    2163  * @param string $callback Function that fills the field with the desired content.  The function should echo its output.
     2187 * @param string $callback Function that fills the field with the desired content. The function should echo its output.
    21642188 * @param string $page The type of settings page on which to show the field (general, reading, writing, ...)
    21652189 * @param string $section The section of the settingss page in which to show the box (default, ...)
     
    21692193    global $wp_settings_fields;
    21702194
    2171     if  ( !isset($wp_settings_fields) )
     2195    if ( !isset($wp_settings_fields) )
    21722196        $wp_settings_fields = array();
    21732197    if ( !isset($wp_settings_fields[$page]) )
     
    22122236        echo '</td>';
    22132237        echo '</tr>';
    2214     }   
     2238    }
    22152239}
    22162240
     
    22452269                    <input type="hidden" name="found_action" value="<?php echo $found_action; ?>" />
    22462270                <?php } ?>
    2247                
     2271
    22482272                <input type="hidden" name="affected" id="affected" value="" />
    22492273                <?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
     
    22802304                    minWidth: 280
    22812305                }).css({'top':st+'px','left':'50%','marginLeft':'-200px'});
    2282                
     2306
    22832307                $('.ui-resizable-handle').css({
    22842308                    'backgroundColor': '#e5e5e5'
    22852309                });
    2286                
     2310
    22872311                $('.ui-resizable-se').css({
    22882312                    'border': '0 none',
     
    22912315                    'background': 'transparent url(images/se.png) no-repeat scroll 0 0'
    22922316                });
    2293                
     2317
    22942318                $('#find-posts-input').focus().keyup(function(e){
    22952319                    if (e.which == 27) findPosts.close(); // close on Escape
    22962320                });
    2297                
     2321
    22982322                return false;
    22992323            },
    2300            
     2324
    23012325            close : function() {
    23022326                $('#find-posts-response').html('');
    23032327                $('#find-posts').draggable('destroy').resizable('destroy').hide();
    23042328            },
    2305            
     2329
    23062330            send : function() {
    23072331                var post = {};
     
    23102334                post['action'] = 'find_posts';
    23112335                post['_ajax_nonce'] = $('#_ajax_nonce').val();
    2312                
     2336
    23132337                if ( $('#find-posts-pages:checked').val() )
    23142338                    post['pages'] = 1;
    23152339                else
    23162340                    post['posts'] = 1;
    2317        
     2341
    23182342                $.ajax({
    23192343                    type : 'POST',
     
    23242348                });
    23252349            },
    2326            
     2350
    23272351            show : function(x) {
    23282352
     
    23362360                if ( r.errors )
    23372361                    this.error({'responseText': wpAjax.broken});
    2338        
     2362
    23392363                r = r.responses[0];
    23402364                $('#find-posts-response').html(r.data);
    23412365            },
    2342            
     2366
    23432367            error : function(r) {
    23442368                var er = r.statusText;
     
    23462370                if ( r.responseText )
    23472371                    er = r.responseText.replace( /<.[^<>]*?>/g, '' );
    2348        
     2372
    23492373                if ( er )
    23502374                    $('#find-posts-response').html(er);
    23512375            }
    23522376        };
    2353        
     2377
    23542378        $(document).ready(function(){
    23552379            $('#find-posts-submit').click(function(e) {
  • trunk/wp-admin/js/inline-edit.js

    r8917 r8943  
    1 var postType   = null;
    2 var postView   = null;
    3 var postsXml   = null;
    4 var inlineRows = null;
    51
    6 jQuery(document).ready(function() {
    7     postType = window.location.href.indexOf('edit.php') == -1 ? 'page' : 'post';
    8     postView = window.location.href.indexOf('mode=excerpt') == -1 ? 'list' : 'excerpt';
     2(function($) {
     3inlineEdit = {
     4    type : '',
     5    rows : '',
    96
    10     // get IDs of all editable rows
    11     inlineRows = jQuery('table.widefat .check-column :checkbox[name="post[]"]').parents('tr');
     7    init : function() {
     8        var t = this, blankRow = $('#inline-edit');
    129
    13     // prepare the edit row
    14     var blankRow = jQuery('#inline-edit');
    15     jQuery('ul.categories *', blankRow).removeAttr('id');
    16     jQuery('ul.categories label', blankRow).removeAttr('for');
    17     blankRow.attr('title', 'Double-click to cancel')
    18         .dblclick(function() { toggleRow(this); })
    19         .keypress(function(event) { if(event.which == 13) return saveRow(this); });
    20     jQuery('span.cancel a', blankRow).click(function() { return revertRow(this); });
    21     jQuery('span.save a', blankRow).click(function() { return saveRow(this); });
     10        t.type = $('table.widefat').hasClass('page') ? 'page' : 'post';
    2211
    23     // add events and get data
    24     inlineRows.dblclick(function() { toggleRow(this); });
    25     addEvents(inlineRows);
     12        // get all editable rows
     13        t.rows = $('tr.iedit');
    2614
    27     // get data
    28     getInlineData('all');
    29 });
     15        // prepare the edit row
     16        blankRow.dblclick(function() { inlineEdit.toggle(this); })
     17            .keyup(function(e) { if(e.which == 27) return inlineEdit.revert(this); });
    3018
    31 function toggleRow(el) {
    32     jQuery('#'+postType+'-'+getRowId(el)).css('display') == 'none' ? revertRow(el) : editRow(el);
    33 }
     19        $('a.cancel', blankRow).click(function() { return inlineEdit.revert(this); });
     20        $('a.save', blankRow).click(function() { return inlineEdit.save(this); });
    3421
    35 // add events to links and make rows double-clickable
    36 function addEvents(rows) {
    37     rows.each(function() {
    38         var row = jQuery(this);
    39         jQuery('a.editinline', row).click(function() { editRow(this); return false; });
    40         row.attr('title', 'Double-click to edit');
    41     });
    42 }
     22        // add events
     23        t.rows.dblclick(function() { inlineEdit.toggle(this); });
     24        t.addEvents(t.rows);
     25    },
    4326
    44 function getInlineData(id) {   
    45     if(id == 'all') {
    46         var editable = [];
    47         inlineRows.each(function(i) { editable[i] = getRowId(this); });
    48         id = editable.join(',');
     27    toggle : function(el) {
     28        var t = this;
     29
     30        $('#'+t.type+'-'+t.getId(el)).css('display') == 'none' ? t.revert(el) : t.edit(el);
     31    },
     32
     33    addEvents : function(r) {
     34        r.each(function() {
     35            var row = $(this);
     36            $('a.editinline', row).click(function() { inlineEdit.edit(this); return false; });
     37            row.attr('title', inlineEditL10n.edit);
     38        });
     39    },
     40
     41    edit : function(id) {
     42        var t = this, type = t.type, old = $('tr.inline-editor').attr('id');
     43
     44        if( typeof(id) == 'object' )
     45            id = t.getId(id);
     46
     47        if ( old ) {
     48            old = old.split('-')[1];
     49            t.revert(old);
     50        }
     51
     52        var fields = ['post_title', 'post_name', 'post_author', 'post_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'post_password'];
     53        if ( type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template');
     54        if ( type == 'post' ) fields.push('tags_input');
     55
     56        // add the new blank row
     57        var editRow = $('#inline-edit').clone(true);
     58
     59        if ( $('#'+type+'-'+id).hasClass('alternate') )
     60            $(editRow).addClass('alternate');
     61        $('#'+type+'-'+id).hide().after(editRow);
     62
     63        // populate the data
     64        var rowData = $('#inline_'+id);
     65        for ( var f = 0; f < fields.length; f++ ) {
     66            $(':input[name="'+fields[f]+'"]', editRow).val( $('.'+fields[f], rowData).val() );
     67        }
     68
     69        if ( $('.comment_status', rowData).val() == 'open' )
     70            $('input[name="comment_status"]', editRow).attr("checked", "checked");
     71        if ( $('.ping_status', rowData).val() == 'open' )
     72            $('input[name="ping_status"]', editRow).attr("checked", "checked");
     73        if ( $('.sticky', rowData).val() == 'sticky' )
     74            $('input[name="sticky"]', editRow).attr("checked", "checked");
     75
     76        // categories
     77        var cats;
     78        if ( cats = $('.post_category', rowData).val() )
     79            $('ul.cat-checklist :checkbox').val(cats.split(','));
     80
     81        // handle the post status
     82        var status = $('.post_status', rowData).val();
     83        if ( status != 'future' ) $('select[name="post_status"] option[value="future"]', editRow).remove();
     84        if ( status == 'private' ) $('input[name="keep_private"]', editRow).attr("checked", "checked");
     85
     86        // remove the current page and children from the parent dropdown
     87        var pageOpt = $('select[name="post_parent"] option[value="'+id+'"]', editRow);
     88        if ( pageOpt.length > 0 ) {
     89            var pageLevel = pageOpt[0].className.split('-')[1], nextPage = pageOpt, pageLoop = true;
     90            while ( pageLoop ) {
     91                var nextPage = nextPage.next('option'), nextLevel = nextPage[0].className.split('-')[1];
     92                if ( nextLevel <= pageLevel ) {
     93                    pageLoop = false;
     94                } else {
     95                    nextPage.remove();
     96                    nextPage = pageOpt;
     97                }
     98            }
     99            pageOpt.remove();
     100        }
     101
     102        // categories expandable?
     103        $('span.catshow', editRow).click(function() {
     104            $('ul.cat-checklist', editRow).addClass("cat-hover");
     105            $('span.cathide', editRow).show();
     106            $(this).hide();
     107        });
     108
     109        $('span.cathide', editRow).click(function() {
     110            $('ul.cat-checklist', editRow).removeClass("cat-hover");
     111            $('span.catshow', editRow).show();
     112            $(this).hide();
     113        });
     114
     115        $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
     116        $('.ptitle', editRow).focus();
     117
     118        // enable autocomplete for tags
     119        if ( type == 'post' )
     120            $('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
     121
     122        return false;
     123    },
     124
     125    save : function(id) {
     126        if( typeof(id) == 'object' )
     127            id = this.getId(id);
     128
     129        $('#edit-'+id+' .check-column').html('<img src="images/loading.gif" alt="" />');
     130
     131        var params = {
     132            action: 'inline-save',
     133            post_type: this.type,
     134            post_ID: id,
     135            edit_date: 'true'
     136        };
     137
     138        var fields = $('#edit-'+id+' :input').fieldSerialize();
     139        params = fields + '&' + $.param(params);
     140
     141        // make ajax request
     142        $.post('admin-ajax.php', params,
     143            function(html) {
     144                var row = $('#'+inlineEdit.type+'-'+id);
     145                $('#edit-'+id).hide();
     146                html = $(html).html();
     147                row.html(html).show();
     148                row.animate( { backgroundColor: '#FFFBCC' }, 200)
     149                     .animate( { backgroundColor: row.css('background-color') }, 500);
     150                inlineEdit.addEvents(row);
     151            }
     152        );
     153        return false;
     154    },
     155
     156    revert : function(id) {
     157        if ( typeof(id) == 'object' )
     158            id = this.getId(id);
     159
     160        $('#edit-'+id).remove();
     161        $('#'+this.type+'-'+id).show();
     162
     163        return false;
     164    },
     165
     166    getId : function(o) {
     167        var id = o.tagName == 'TR' ? o.id : $(o).parents('tr').attr('id');
     168        var parts = id.split('-');
     169        return parts[parts.length - 1];
    49170    }
     171};
    50172
    51     if(id == '')
    52         return false;
    53    
    54     jQuery.post('admin-ajax.php', {
    55             'inline_edit_nonce': jQuery('#inline_edit_nonce').val(),
    56             action: 'inline-data',
    57             posts: id
    58         },
    59         function(xml) {
    60             if(id.indexOf(',') == -1) {
    61                 var newData = jQuery(xml).find('post[id="'+id+'"]');
    62                 jQuery(postsXml).find('post[id="'+id+'"]').replaceWith(newData);
    63             } else {
    64                 postsXml = xml;
    65             }
    66         }, 'xml'
    67     );
    68 }
    69 
    70 function editRow(id) {
    71     if(typeof(id) == 'object')
    72         id = getRowId(id);
    73 
    74     var blankRow = jQuery('#inline-edit');
    75 
    76     var fields = ['post_title', 'post_name', 'post_author', 'post_status', 'jj', 'mm', 'aa', 'hh', 'mn'];
    77     if(postType == 'page') fields.push('post_parent', 'menu_order', 'page_template', 'post_password');
    78     if(postType == 'post') fields.push('tags_input');
    79 
    80     // add the new blank row
    81     var editRow = blankRow.clone(true);
    82     jQuery(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
    83     if(jQuery('#'+postType+'-'+id).hasClass('alternate'))
    84         jQuery(editRow).addClass('alternate');
    85     jQuery('#'+postType+'-'+id).hide().after(editRow);
    86    
    87     // populate the data
    88     var rowData = jQuery(postsXml).find('post[id="'+id+'"]');
    89     for(var f = 0; f < fields.length; f++) {
    90         jQuery(':input[name="'+fields[f]+'"]', editRow).val(jQuery(fields[f], rowData).text());
    91     }
    92    
    93     // ping, comments, and privacy
    94     if(jQuery('comment_status', rowData).text() == 'open')
    95         jQuery('input[name="comment_status"]', editRow).select();
    96     if(jQuery('ping_status', rowData).text() == 'open')
    97         jQuery('input[name="ping_status"]', editRow).select();
    98     if(jQuery('sticky', rowData).text() == 'sticky')
    99         jQuery('input[name="sticky"]', editRow).select();
    100    
    101     // categories
    102     var categories = jQuery('post_category', rowData).text().split(',');
    103     jQuery(categories).each(function() {
    104         jQuery('ul.categories :checkbox[value="'+this+'"]', editRow).select();
    105     });
    106    
    107     // handle the post status
    108     var status = jQuery('post_status', rowData).text();
    109     if(status != 'future') jQuery('select[name="post_status"] option[value="future"]', editRow).remove();
    110     if(status == 'private') jQuery('input[name="page_private"]', editRow).select();
    111    
    112     // enable autocomplete for tags
    113     if(postType == 'post') {
    114         jQuery('tr.inline textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
    115     }
    116    
    117     // remove the current page and children from the parent dropdown
    118     var pageOpt = jQuery('select[name="post_parent"] option[value="'+id+'"]', editRow);
    119     if(pageOpt.length > 0) {
    120         var pageLevel = pageOpt[0].className.split('-')[1];
    121         var nextPage = pageOpt; var pageLoop = true;
    122         while(pageLoop) {
    123             var nextPage  = nextPage.next('option');
    124             var nextLevel = nextPage[0].className.split('-')[1];
    125             if(nextLevel <= pageLevel)
    126                 pageLoop = false;
    127             else {
    128                 nextPage.remove();
    129                 nextPage = pageOpt;
    130             }
    131         }
    132         pageOpt.remove();
    133     }
    134 
    135     return false;
    136 }
    137 
    138 function saveRow(id) {
    139     if(typeof(id) == 'object')
    140       id = getRowId(id);
    141 
    142     jQuery('#edit-'+id+' .check-column').html('<img src="images/loading.gif" alt="" />');
    143 
    144     var params = {
    145         'inline_edit_nonce': jQuery('#inline_edit_nonce').val(),
    146         action: 'inline-save',
    147         post_type: postType,
    148         post_ID: id,
    149         edit_date: 'true',
    150         post_view: postView
    151     };
    152 
    153     var fields = jQuery('#edit-'+id+' :input').fieldSerialize();
    154     params = fields + '&' + jQuery.param(params);
    155    
    156     // make ajax request
    157     jQuery.post('admin-ajax.php', params,
    158         function(html) {
    159             var row = jQuery('#'+postType+'-'+id);
    160             jQuery('#edit-'+id).hide();
    161             html = jQuery(html).html();
    162             row.html(html).show();
    163             row.animate( { backgroundColor: '#FFFBCC' }, 200)
    164                  .animate( { backgroundColor: row.css('background-color') }, 500);
    165             getInlineData(id);
    166             addEvents(row);
    167         }
    168     );
    169 
    170     return false;
    171 }
    172 
    173 function revertRow(id) {
    174     if(typeof(id) == 'object')
    175         id = getRowId(id);
    176 
    177     jQuery('#edit-'+id).remove();
    178     jQuery('#'+postType+'-'+id).show();
    179 
    180     return false;
    181 }
    182 
    183 function getRowId(obj) {
    184     var id = obj.tagName == 'TR' ? obj.id : jQuery(obj).parents('tr').attr('id');
    185     var parts = id.split('-');
    186     return parts[parts.length - 1];
    187 }
     173$(document).ready(function(){inlineEdit.init();});
     174})(jQuery);
  • trunk/wp-admin/wp-admin.css

    r8917 r8943  
    21602160}
    21612161
    2162 .inline-editor .save {
    2163     padding-top: 5px;
    2164 }
    2165 
    21662162.inline-editor td {
    2167     padding-right: 4px;
    2168     padding-left: 7px;
    2169 }
    2170 
    2171 .inline-editor input, .inline-editor select, .inline-editor textarea {
    2172     font-size: 10px !important;
     2163    padding: 3px;
     2164}
     2165
     2166.inline-editor .save,
     2167.inline-editor .cancel {
     2168    margin-right: 5px;
     2169}
     2170
     2171.inline-editor .quick-edit-div {
     2172    float: left;
     2173    height: 85px;
     2174    margin: 0 5px 3px 0;
     2175    width: 130px;
     2176    border-style: solid;
     2177    border-width: 1px;
    21732178    padding: 2px;
    2174     border: 1px solid #ddd;
    2175 }
    2176 
    2177 .inline-editor td.date {
    2178     width: 87px;
    2179 }
    2180 
    2181 .inline-editor td.page-title {
    2182     width: 495px;
    2183 }
    2184 
    2185 .inline-editor td.post-title input.title {
    2186     width: 250px;
    2187 }
    2188 
    2189 .inline-editor td.post-title input.slug {
    2190     width: 222px;
    2191     float: right;
     2179}
     2180
     2181.inline-editor .in {
     2182    padding: 4px;
     2183    margin: 2px 0 0;
     2184    line-height: 15px;
     2185}
     2186
     2187.inline-editor input {
     2188    font-size: 11px !important;
     2189    padding: 2px;
     2190    border-width: 1px;
     2191    border-style: solid;
     2192}
     2193
     2194#wpbody-content .inline-editor select {
     2195    padding: 0;
     2196    height: auto;
     2197    width: 120px;
     2198    font-size: 11px !important;
    21922199}
    21932200
    21942201.inline-editor div.title {
    2195     float: left;
    2196 }
    2197 
    2198 .inline-editor div.title input.title {
     2202    padding: 2px 5px;
     2203    cursor: default;
     2204}
     2205
     2206.inline-editor .post-title,
     2207.inline-editor .page-title {
     2208    width: 260px;
     2209}
     2210
     2211.inline-editor .post-title .ptitle,
     2212.inline-editor .page-title .ptitle {
     2213    width: 245px;
     2214    margin-bottom: 5px;
    21992215    font-size: 12px !important;
    22002216}
    22012217
    2202 .inline-editor div.title label {
    2203     float: left;
    2204     margin-top: 4px;
    2205 }
    2206 
    2207 .inline-editor td.page-title input.slug {
    2208     width: 123px;
    2209     float: right;
    2210 }
    2211 
    2212 .inline-editor div.other, .inline-editor div.more {
    2213     width: 190px;
    2214     float: left;
    2215     padding-left: 5px;
    2216 }
    2217 
    2218 .inline-editor div.other label, .inline-editor div.more label {
    2219     display: block; float: left;
    2220     width: 54px;
    2221     margin-top: 4px;
    2222 }
    2223 
    2224 .inline-editor div.other select {
    2225     width: 133px;
    2226 }
    2227 
    2228 .inline-editor div.more {
    2229     width: 125px;
    2230 }
    2231 
    2232 .inline-editor div.more input {
    2233     width: 60px;
    2234 }
    2235 
    2236 .inline-editor td.author select {
    2237     width: 110px;
    2238 }
    2239 
    2240 .inline-editor ul.categories {
     2218.inline-editor .post-title .slug,
     2219.inline-editor .page-title .slug {
     2220    text-align: right;
     2221}
     2222
     2223.inline-editor .slug input {
     2224    width: 170px;
     2225    margin: 0 2px 0 4px;
     2226}
     2227
     2228.inline-editor .password input,
     2229.inline-editor .order input {
     2230    width: 112px;
     2231}
     2232
     2233.inline-editor .password label input {
     2234    width: auto;
     2235    margin: 3px 0 0;
     2236}
     2237
     2238.inline-editor .date {
     2239    width: 160px;
     2240}
     2241
     2242.inline-editor .date input {
     2243    padding: 2px 1px;
     2244    margin: 1px;
     2245    width: 18px;
     2246}
     2247
     2248.inline-editor .date input[name="aa"] {
     2249    width: 30px;
     2250}
     2251
     2252#wpbody-content .inline-editor .date select {
     2253    width: 80px;
     2254}
     2255
     2256.inline-editor .categories {
     2257    width: 180px;
     2258}
     2259
     2260.inline-editor .categories ul.cat-checklist {
    22412261    list-style: none;
    2242     padding: 0; margin: 0;
     2262    padding: 0 0 0 4px;
     2263    margin: 0;
    22432264    height: 65px;
    22442265    overflow: auto;
    2245     font-size: 10px;
    2246 }
    2247 
    2248 .inline-editor ul.categories ul.children {
     2266    font-size: 11px;
     2267    z-index: 5;
     2268    position: relative;
     2269    overflow-x: hidden;
     2270}
     2271
     2272.inline-editor .categories ul.cat-hover {
     2273    height: 200px;
     2274    overflow: auto;
     2275}
     2276
     2277.inline-editor .categories ul.children {
    22492278    list-style: none;
    22502279    padding-left: 15px;
    22512280}
    22522281
    2253 .inline-editor ul.categories li {
    2254     margin-bottom: 2px;
    2255 }
    2256 
    2257 .inline-editor ul.categories input {
     2282.inline-editor .categories li {
     2283    margin-bottom: 3px;
     2284    line-height: auto;
     2285}
     2286
     2287.inline-editor .categories input {
    22582288    vertical-align: middle;
    2259     padding: 0; border: 0;
    2260 }
    2261 
    2262 .inline-editor td.tags textarea {
    2263     height: 58px; width: 100%;
    2264 }
    2265 
    2266 .inline-editor td.comments {
    2267     padding-left: 0;
    2268 }
    2269 
    2270 .inline-editor td.status select {
    2271     width: 98px;
    2272 }
    2273 
    2274 .inline-editor td.status input {
    2275     vertical-align: middle;
     2289    padding: 0;
     2290    border: 0;
     2291}
     2292
     2293.inline-editor .categories .catshow,
     2294.inline-editor .categories .cathide {
     2295    font-size: 9px;
     2296    cursor: pointer;
     2297}
     2298
     2299.inline-editor .tags {
     2300    width: 220px;
     2301}
     2302
     2303.inline-editor textarea {
     2304    border-width: 1px;
     2305    border-style: solid;
     2306    height: 45px;
     2307    width: 200px;
     2308    font-size: 11px;
     2309}
     2310
     2311.inline-editor .comments {
     2312    text-align: left;
     2313    width: 160px;
     2314}
     2315
     2316.inline-editor .quick-edit-save {
     2317    padding: 8px 10px;
    22762318}
    22772319
  • trunk/wp-includes/script-loader.php

    r8936 r8943  
    245245        $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
    246246       
    247         $scripts->add( 'inline-edit', '/wp-admin/js/inline-edit.js', array( 'jquery', 'jquery-form', 'suggest' ), '20080812' );
     247        $scripts->add( 'inline-edit', '/wp-admin/js/inline-edit.js', array( 'jquery', 'jquery-form', 'suggest' ), '20080920' );
     248        $scripts->localize( 'inline-edit', 'inlineEditL10n', array(
     249            'edit' => __('Double-click to edit')
     250        ) );
    248251
    249252        $scripts->add( 'plugin-install', '/wp-admin/js/plugin-install.js', array( 'thickbox', 'jquery' ), '20080803' );
Note: See TracChangeset for help on using the changeset viewer.