Make WordPress Core

Changeset 8780


Ignore:
Timestamp:
08/30/2008 07:16:16 AM (17 years ago)
Author:
azaozz
Message:

Add hotkeys.js to all pages that list comments and prevent error if not loaded, see #7643

Location:
trunk/wp-admin
Files:
5 edited

Legend:

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

    r8720 r8780  
    6767wp($query_str);
    6868
    69 if ( is_singular() )
     69if ( is_singular() ) {
    7070    wp_enqueue_script( 'admin-comments' );
     71    wp_enqueue_script( 'jquery-table-hotkeys' );
     72}
    7173
    7274require_once('admin-header.php');
  • trunk/wp-admin/edit.php

    r8767 r8780  
    5454list($post_stati, $avail_post_stati) = wp_edit_posts_query();
    5555
    56 if ( 1 == count($posts) && is_singular() )
     56if ( 1 == count($posts) && is_singular() ) {
    5757    wp_enqueue_script( 'admin-comments' );
     58    wp_enqueue_script( 'jquery-table-hotkeys' );
     59}
    5860
    5961require_once('admin-header.php');
  • trunk/wp-admin/js/edit-comments.js

    r8777 r8780  
    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']);
     238    if ( typeof $.table_hotkeys != 'undefined' )
     239        $.table_hotkeys($('table.widefat'), ['a', 'u', 's', 'd', 'r']);
    239240});
    240241
  • trunk/wp-admin/post.php

    r8720 r8780  
    132132    wp_enqueue_script('word-count');
    133133    wp_enqueue_script( 'admin-comments' );
     134    wp_enqueue_script( 'jquery-table-hotkeys' );
    134135
    135136    if ( current_user_can('edit_post', $post_ID) ) {
  • trunk/wp-admin/upload.php

    r8767 r8780  
    5252list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    5353
    54 if ( is_singular() )
     54if ( is_singular() ) {
    5555    wp_enqueue_script( 'admin-comments' );
     56    wp_enqueue_script( 'jquery-table-hotkeys' );
     57}
    5658
    5759require_once('admin-header.php');
Note: See TracChangeset for help on using the changeset viewer.