WordPress.org

Make WordPress Core

Changeset 8777


Ignore:
Timestamp:
08/29/2008 09:43:34 PM (10 years ago)
Author:
ryan
Message:

Comment manipulation keyboard shorcuts from nbachiyski. see #7643

Location:
trunk
Files:
2 added
6 edited

Legend:

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

    r8768 r8777  
    800800    background-color: #f8f8f8;
    801801}
     802
     803/* table vim shorcuts */
     804.vim-current {
     805    background-color: #CFEBF7 !important;
     806}
  • trunk/wp-admin/css/colors-fresh.css

    r8768 r8777  
    783783    background-color: #f8f8f8;
    784784}
     785
     786/* table vim shorcuts */
     787.vim-current {
     788    background-color: #E4F2FD !important;
     789}
  • trunk/wp-admin/edit-comments.php

    r8767 r8777  
    1313wp_enqueue_script( 'admin-comments' );
    1414wp_enqueue_script( 'admin-forms' );
     15wp_enqueue_script( 'jquery-table-hotkeys' );
    1516
    1617if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) {
  • trunk/wp-admin/includes/template.php

    r8776 r8777  
    10171017
    10181018    if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    1019         $actions['approve']   = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . "</a> | ";
    1020         $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . "</a> | ";
     1019        $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> | ";
     1020        $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> | ";
    10211021        $actions['edit']      = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a> | ';
    10221022        if ( 'spam' != $the_comment_status )
    1023             $actions['spam']      = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | ';
    1024         $actions['delete']    = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>';
     1023            $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> | ';
     1024        $actions['delete']    = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
    10251025
    10261026        if ( $comment_status ) { // not looking at all comments
    10271027            if ( 'approved' == $the_comment_status ) {
    1028                 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';
     1028                $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';
    10291029                unset($actions['approve']);
    10301030            } else {
    1031                 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';
     1031                $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';
    10321032                unset($actions['unapprove']);
    10331033            }
     
    10351035
    10361036        if ( 'spam' != $the_comment_status )
    1037             $actions['reply'] = '<span class="hide-if-no-js"> | <a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a></span>';
     1037            $actions['reply'] = '<span class="hide-if-no-js"> | <a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a></span>';
    10381038
    10391039        $actions = apply_filters( 'comment_row_actions', $actions, $comment );
  • trunk/wp-admin/js/edit-comments.js

    r8767 r8777  
    236236    if ( typeof QTags != 'undefined' )
    237237        ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more');
     238    jQuery.table_hotkeys(jQuery('table.widefat'), ['a', 'u', 's', 'd', 'r']);
    238239});
    239240
  • trunk/wp-includes/script-loader.php

    r8767 r8777  
    7373    $scripts->add( 'suggest', '/wp-includes/js/jquery/suggest.js', array('jquery'), '1.1b');
    7474    $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20');
     75    $scripts->add( 'jquery-hotkeys', '/wp-includes/js/jquery/jquery.hotkeys.js', array('jquery'), '0.0.2' );
     76    $scripts->add( 'jquery-table-hotkeys', '/wp-includes/js/jquery/jquery.table-hotkeys.js', array('jquery', 'jquery-hotkeys'), '20080829' );
    7577    $scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430');
    7678    $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.0.2-20080430');
     
    225227    $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' );
    226228
    227     $styles->add( 'wp-admin', '/wp-admin/wp-admin.css' );
     229    $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20080829' );
    228230    $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
    229231
Note: See TracChangeset for help on using the changeset viewer.