Make WordPress Core

Changeset 8981


Ignore:
Timestamp:
09/25/2008 09:12:33 PM (17 years ago)
Author:
ryan
Message:

Add colmn headrs and actions to bottom of posts table

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-post-rows.php

    r8973 r8981  
    2929?>
    3030    </tbody>
     31    <thead>
     32    <tr>
     33<?php print_column_headers('post'); ?>
     34    </tr>
     35    </thead>
    3136</table>
  • trunk/wp-admin/edit.php

    r8973 r8981  
    1010require_once('admin.php');
    1111
     12$action = -1;
     13if ( isset($_GET['action2']) && $_GET['action2'] != -1 )
     14    $action = $_GET['action2'];
     15if ( isset($_GET['action']) && $_GET['action'] != -1 )
     16    $action = $_GET['action'];
     17
    1218// Handle bulk actions
    13 if ( isset($_GET['action']) && $_GET['action'] != -1 ) {
    14     switch ( $_GET['action'] ) {
     19if ( $action != -1 ) {
     20    switch ( $action ) {
    1521        case 'delete':
    16             if ( isset($_GET['post']) && isset($_GET['doaction']) ) {
     22            if ( isset($_GET['post']) &&  (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) {
    1723                check_admin_referer('bulk-posts');
    1824                foreach( (array) $_GET['post'] as $post_id_del ) {
     
    266272<?php include( 'edit-post-rows.php' ); ?>
    267273
    268 </form>
    269 
    270 <?php inline_edit_row( 'post' ); ?>
    271 
    272 <div id="ajax-response"></div>
    273 
    274274<div class="tablenav">
    275275
     
    279279?>
    280280
    281 <br class="clear" />
    282 </div>
     281<div class="alignleft">
     282<select name="action2">
     283<option value="-1" selected="selected"><?php _e('Actions'); ?></option>
     284<option value="edit"><?php _e('Edit'); ?></option>
     285<option value="delete"><?php _e('Delete'); ?></option>
     286</select>
     287<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
     288<br class="clear" />
     289</div>
     290<br class="clear" />
     291</div>
     292
     293</form>
     294
     295<?php inline_edit_row( 'post' ); ?>
     296
     297<div id="ajax-response"></div>
    283298
    284299<br class="clear" />
  • trunk/wp-admin/js/inline-edit.js

    r8973 r8981  
    5151        $('#doaction').click(function(e){
    5252            if ( $('select[name="action"]').val() == 'edit' ) {
     53                e.preventDefault();
     54                t.setBulk();
     55            } else if ( $('form#posts-filter tr.inline-editor').length > 0 ) {
     56                t.revert();
     57            }
     58        });
     59
     60        $('#doaction2').click(function(e){
     61            if ( $('select[name="action2"]').val() == 'edit' ) {
    5362                e.preventDefault();
    5463                t.setBulk();
  • trunk/wp-includes/script-loader.php

    r8976 r8981  
    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' ), '20080925' );
     247        $scripts->add( 'inline-edit', '/wp-admin/js/inline-edit.js', array( 'jquery', 'jquery-form', 'suggest' ), '20080926' );
    248248        $scripts->localize( 'inline-edit', 'inlineEditL10n', array(
    249249            'edit' => __('Double-click to edit')
Note: See TracChangeset for help on using the changeset viewer.