Ticket #6005: no_js_bulk_delete_messages.3.diff
File no_js_bulk_delete_messages.3.diff, 23.7 KB (added by , 10 years ago) |
---|
-
src/bp-messages/bp-messages-actions.php
92 92 add_action( 'bp_actions', 'messages_action_delete_message' ); 93 93 94 94 /** 95 * Handle marking single message thread as read. 96 * 97 * @since BuddyPress (2.2) 98 * 99 * @return bool 100 */ 101 function bp_messages_action_mark_read() { 102 103 if ( ! bp_is_messages_component() || bp_is_current_action( 'notices' ) || ! bp_is_action_variable( 'read', 0 ) ) { 104 return false; 105 } 106 107 // Get the action 108 $action = !empty( $_GET['action'] ) ? $_GET['action'] : ''; 109 $nonce = !empty( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : ''; 110 $id = !empty( $_GET['message_id'] ) ? $_GET['message_id'] : ''; 111 112 // Bail if no action or no ID 113 if ( ( 'read' !== $action ) || empty( $id ) || empty( $nonce ) ) { 114 return false; 115 } 116 117 // Check the nonce and mark the message 118 if ( bp_verify_nonce_request( 'bp_message_thread_mark_read_' . $id ) && messages_check_thread_access( $id ) ) { 119 messages_mark_thread_read( $id ); 120 bp_core_add_message( __( 'Message marked read.', 'buddypress' ) ); 121 } else { 122 bp_core_add_message( __( 'There was a problem marking that message.', 'buddypress' ), 'error' ); 123 } 124 125 // Redirect 126 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ); 127 } 128 add_action( 'bp_actions', 'bp_messages_action_mark_read' ); 129 130 /** 131 * Handle marking single message thread as unread. 132 * 133 * @since BuddyPress (2.2) 134 * 135 * @return bool 136 */ 137 function bp_messages_action_mark_unread() { 138 139 if ( ! bp_is_messages_component() || bp_is_current_action( 'notices' ) || ! bp_is_action_variable( 'unread', 0 ) ) { 140 return false; 141 } 142 143 // Get the action 144 $action = !empty( $_GET['action'] ) ? $_GET['action'] : ''; 145 $nonce = !empty( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : ''; 146 $id = !empty( $_GET['message_id'] ) ? $_GET['message_id'] : ''; 147 148 // Bail if no action or no ID 149 if ( ( 'unread' !== $action ) || empty( $id ) || empty( $nonce ) ) { 150 return false; 151 } 152 153 // Check the nonce and mark the message 154 if ( bp_verify_nonce_request( 'bp_message_thread_mark_unread_' . $id ) && messages_check_thread_access( $id ) ) { 155 messages_mark_thread_unread( $id ); 156 bp_core_add_message( __( 'Message marked unread.', 'buddypress' ) ); 157 } else { 158 bp_core_add_message( __( 'There was a problem marking that message.', 'buddypress' ), 'error' ); 159 } 160 161 // Redirect 162 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ); 163 } 164 add_action( 'bp_actions', 'bp_messages_action_mark_unread' ); 165 166 /** 167 * Handles bulk management (mark as read/unread, delete) of message threads. 168 * 169 * @since BuddyPress (2.2) 170 * 171 * @return bool 172 */ 173 function bp_messages_action_bulk_manage() { 174 175 if ( ! bp_is_messages_component() || bp_is_current_action( 'notices' ) || ! bp_is_action_variable( 'bulk-manage', 0 ) ) { 176 return false; 177 } 178 179 // Get the action 180 $action = !empty( $_POST['messages_bulk_action'] ) ? $_POST['messages_bulk_action'] : ''; 181 $nonce = !empty( $_POST['messages_bulk_nonce'] ) ? $_POST['messages_bulk_nonce'] : ''; 182 $messages = !empty( $_POST['message_ids'] ) ? $_POST['message_ids'] : ''; 183 184 // Bail if no action or no IDs. 185 if ( ( ! in_array( $action, array( 'delete', 'read', 'unread' ) ) ) || empty( $messages ) || empty( $nonce ) ) { 186 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); 187 return false; 188 } 189 190 $messages = wp_parse_id_list( $messages ); 191 192 // Check the nonce. 193 if ( ! wp_verify_nonce( $nonce, 'messages_bulk_nonce' ) ) { 194 bp_core_add_message( __( 'There was a problem managing your messages.', 'buddypress' ), 'error' ); 195 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); 196 return false; 197 } 198 199 // Delete, mark as read or unread depending on the user 'action'. 200 switch ( $action ) { 201 case 'delete' : 202 foreach ( $messages as $message ) { 203 if ( ! messages_check_thread_access( $message ) ) { 204 bp_core_add_message( __( 'There was a problem managing your messages.', 'buddypress' ), 'error' ); 205 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); 206 return false; 207 } else { 208 messages_delete_thread( $message ); 209 } 210 } 211 bp_core_add_message( __( 'Messages deleted.', 'buddypress' ) ); 212 break; 213 214 case 'read' : 215 foreach ( $messages as $message ) { 216 if ( ! messages_check_thread_access( $message ) ) { 217 bp_core_add_message( __( 'There was a problem managing your messages.', 'buddypress' ), 'error' ); 218 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); 219 return false; 220 } else { 221 messages_mark_thread_read( $message ); 222 } 223 } 224 bp_core_add_message( __( 'Messages marked as read', 'buddypress' ) ); 225 break; 226 227 case 'unread' : 228 foreach ( $messages as $message ) { 229 if ( ! messages_check_thread_access( $message ) ) { 230 bp_core_add_message( __( 'There was a problem managing your messages.', 'buddypress' ), 'error' ); 231 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); 232 return false; 233 } else { 234 messages_mark_thread_unread( $message ); 235 } 236 } 237 bp_core_add_message( __( 'Messages marked as unread.', 'buddypress' ) ); 238 break; 239 } 240 241 // Redirect 242 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); 243 } 244 add_action( 'bp_actions', 'bp_messages_action_bulk_manage' ); 245 246 /** 95 247 * Process a request to bulk delete messages. 96 248 * 97 249 * @return bool False on failure. -
src/bp-messages/bp-messages-template.php
545 545 } 546 546 547 547 /** 548 * Output the formatted delete link for the current message thread. 549 * 550 * @since BuddyPress (2.2) 551 * 552 * @uses bp_get_message_thread_delete_link() 553 */ 554 function bp_the_message_thread_delete_link_formatted() { 555 echo bp_get_the_message_thread_delete_link_formatted(); 556 } 557 /** 558 * Return the formatted delete link for the current message thread. 559 * 560 * @since BuddyPress (2.2) 561 */ 562 function bp_get_the_message_thread_delete_link_formatted() { 563 $retval = '<a href="' . bp_get_message_thread_delete_link() . '" class="delete">' . __( 'Delete', 'buddypress' ) . '</a>'; 564 return apply_filters( 'bp_get_the_message_thread_delete_link_formatted', $retval ); 565 } 566 567 /** 548 568 * Output the URL for deleting the current thread. 549 569 */ 550 570 function bp_message_thread_delete_link() { … … 561 581 } 562 582 563 583 /** 584 * Output the mark unread link for the current message thread. 585 * 586 * @since BuddyPress (2.2) 587 * 588 */ 589 function bp_the_message_thread_mark_unread_link() { 590 echo bp_get_the_message_thread_mark_unread_link(); 591 } 592 /** 593 * Return the mark unread link for the current message thread. 594 * 595 * @since BuddyPress (2.2) 596 */ 597 function bp_get_the_message_thread_mark_unread_link() { 598 $retval = '<a href="' . bp_get_the_message_thread_mark_unread_url() . '" class="unread">' . __( 'Unread', 'buddypress' ) . '</a>'; 599 return apply_filters( 'bp_get_the_message_thread_mark_unread_link', $retval ); 600 } 601 602 /** 603 * Output the URL used for marking a single message thread as unread 604 * 605 * Since this function directly outputs a URL, it is escaped. 606 * 607 * @since BuddyPress (2.2) 608 * 609 */ 610 function bp_the_message_thread_mark_unread_url() { 611 echo esc_url( bp_get_the_message_thread_mark_unread_url() ); 612 } 613 /** 614 * Return the URL used for marking a single message thread as unread 615 * 616 * @since BuddyPress (2.2) 617 */ 618 function bp_get_the_message_thread_mark_unread_url() { 619 620 // Get the message ID 621 $id = bp_get_message_thread_id(); 622 623 // Get the args to add to the URL 624 $args = array( 625 'action' => 'unread', 626 'message_id' => $id 627 ); 628 629 // Add the args to the URL 630 $url = add_query_arg( $args, bp_get_message_thread_unread_permalink() ); 631 632 // Add the nonce 633 $url = wp_nonce_url( $url, 'bp_message_thread_mark_unread_' . $id ); 634 635 // Filter and return 636 return apply_filters( 'bp_get_the_message_thread_mark_unread_url', $url ); 637 } 638 639 /** 640 * Output the read message thread permalink. 641 * 642 * @since BuddyPress (2.2) 643 */ 644 function bp_message_thread_unread_permalink() { 645 echo bp_get_message_thread_unread_permalink(); 646 } 647 /** 648 * Return the read message thread permalink. 649 * 650 * @since BuddyPress (2.2) 651 * 652 * @return string Read message thread permalink. 653 */ 654 function bp_get_message_thread_unread_permalink() { 655 $retval = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/unread' ); 656 return apply_filters( 'bp_get_message_thread_unread_permalink', $retval ); 657 } 658 659 /** 660 * Output the mark read link for the current message thread. 661 * 662 * @since BuddyPress (2.2) 663 * 664 */ 665 function bp_the_message_thread_mark_read_link() { 666 echo bp_get_the_message_thread_mark_read_link(); 667 } 668 /** 669 * Return the mark read link for the current message thread. 670 * 671 * @since BuddyPress (2.2) 672 */ 673 function bp_get_the_message_thread_mark_read_link() { 674 $retval = '<a href="' . bp_get_the_message_thread_mark_read_url() . '" class="read">' . __( 'Read', 'buddypress' ) . '</a>'; 675 return apply_filters( 'bp_get_the_message_thread_mark_read_link', $retval ); 676 } 677 678 /** 679 * Output the URL used for marking a single message thread as read 680 * 681 * Since this function directly outputs a URL, it is escaped. 682 * 683 * @since BuddyPress (2.2) 684 * 685 */ 686 function bp_the_message_thread_mark_read_url() { 687 echo esc_url( bp_get_the_message_thread_mark_read_url() ); 688 } 689 /** 690 * Return the URL used for marking a single message thread as read 691 * 692 * @since BuddyPress (2.2) 693 */ 694 function bp_get_the_message_thread_mark_read_url() { 695 696 // Get the message ID 697 $id = bp_get_message_thread_id(); 698 699 // Get the args to add to the URL 700 $args = array( 701 'action' => 'read', 702 'message_id' => $id 703 ); 704 705 // Add the args to the URL 706 $url = add_query_arg( $args, bp_get_message_thread_read_permalink() ); 707 708 // Add the nonce 709 $url = wp_nonce_url( $url, 'bp_message_thread_mark_read_' . $id ); 710 711 // Filter and return 712 return apply_filters( 'bp_get_the_message_thread_mark_read_url', $url ); 713 } 714 715 /** 716 * Output the read message thread permalink. 717 * 718 * @since BuddyPress (2.2) 719 */ 720 function bp_message_thread_read_permalink() { 721 echo bp_get_message_thread_read_permalink(); 722 } 723 /** 724 * Return the read message thread permalink. 725 * 726 * @since BuddyPress (2.2) 727 * 728 * @return string Read message thread permalink. 729 */ 730 function bp_get_message_thread_read_permalink() { 731 $retval = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/read' ); 732 return apply_filters( 'bp_get_message_thread_read_permalink', $retval ); 733 } 734 735 /** 736 * Output the mark link for the current message thread. 737 * 738 * @since BuddyPress (2.2) 739 * 740 */ 741 function bp_the_message_thread_mark_link() { 742 echo bp_get_the_message_thread_mark_link(); 743 } 744 /** 745 * Return the mark link for the current message thread. 746 * 747 * @since BuddyPress (2.2) 748 */ 749 function bp_get_the_message_thread_mark_link() { 750 751 if ( bp_message_thread_has_unread() ) { 752 $retval = bp_get_the_message_thread_mark_read_link(); 753 } else { 754 $retval = bp_get_the_message_thread_mark_unread_link(); 755 } 756 757 return apply_filters( 'bp_get_the_message_thread_mark_link', $retval ); 758 } 759 760 /** 761 * Output the action links for the current message thread. 762 * 763 * @since BuddyPress (2.2) 764 */ 765 function bp_the_message_thread_action_links( $args = '' ) { 766 echo bp_get_the_message_thread_action_links( $args ); 767 } 768 /** 769 * Return the action links for the current message thread. 770 * 771 * @since BuddyPress (2.2) 772 * 773 * @param array $args { 774 * @type string $before HTML before the links. 775 * @type string $after HTML after the links. 776 * @type string $sep HTML between the links. 777 * @type array $links Array of links to implode by 'sep'. 778 * } 779 * 780 * @return string HTML links for actions to take on single message threads. 781 */ 782 function bp_get_the_message_thread_action_links( $args = '' ) { 783 784 // Parse 785 $r = wp_parse_args( $args, array( 786 'before' => '', 787 'after' => '', 788 'sep' => ' | ', 789 'links' => array( 790 bp_get_the_message_thread_mark_link(), 791 bp_get_the_message_thread_delete_link_formatted() 792 ) 793 ) ); 794 795 // Build the links 796 $retval = $r['before'] . implode( $r['links'], $r['sep'] ) . $r['after']; 797 798 return apply_filters( 'bp_get_the_message_thread_action_links', $retval ); 799 } 800 801 /** 564 802 * Output the CSS class for the current thread. 565 803 */ 566 804 function bp_message_css_class() { … … 620 858 } 621 859 622 860 /** 861 * Output the current thread's total count. 862 * @since Buddypress (2.2) 863 */ 864 function bp_message_thread_total_count( $thread_id ) { 865 echo bp_get_message_thread_total_count( $thread_id ); 866 } 867 /** 868 * Get the current thread's total count. 869 * 870 * @return int 871 */ 872 function bp_get_message_thread_total_count( $thread_id ) { 873 $thread_template = new BP_Messages_Thread_Template( $thread_id, 'ASC' ); 874 875 $count = ! empty( $thread_template->message_count ) 876 ? (int) $thread_template->message_count 877 : false; 878 879 return apply_filters( 'bp_get_message_thread_total_count', $count ); 880 } 881 882 /** 883 * Output the current thread's total and unread count. 884 * @since Buddypress (2.2) 885 */ 886 function bp_message_thread_total_and_unread_count( $thread_id ) { 887 echo bp_get_message_thread_total_and_unread_count( $thread_id ); 888 } 889 /** 890 * Get the current thread's total and unread count. 891 * 892 * @return html 893 */ 894 function bp_get_message_thread_total_and_unread_count( $thread_id ) { 895 $total = bp_get_message_thread_total_count( $thread_id ) ? bp_get_message_thread_total_count( $thread_id ) : 0; 896 $unread = bp_get_message_thread_unread_count() ? bp_get_message_thread_unread_count() : 0; 897 return sprintf( '(%d) <span class="bp-screen-reader-text">%s %d %s</span>', 898 $total, _n( 'message', 'messages', $total, 'buddypress' ), $unread, __( 'unread' , 'buddypress' ) 899 ); 900 } 901 902 /** 623 903 * Output the unformatted date of the last post in the current thread. 624 904 */ 625 905 function bp_message_thread_last_post_date_raw() { … … 856 1136 function bp_messages_options() { 857 1137 ?> 858 1138 859 <?php _e( 'Select:', 'buddypress' ) ?> 1139 <label for="message-type-select" class="bp-screen-reader-text"> 1140 <?php _e( 'Select:', 'buddypress' ) ?> 1141 </label> 860 1142 861 1143 <select name="message-type-select" id="message-type-select"> 862 <option value="">< /option>1144 <option value=""><?php _e( 'Select', 'buddypress' ); ?></option> 863 1145 <option value="read"><?php _ex('Read', 'Message dropdown filter', 'buddypress') ?></option> 864 1146 <option value="unread"><?php _ex('Unread', 'Message dropdown filter', 'buddypress') ?></option> 865 1147 <option value="all"><?php _ex('All', 'Message dropdown filter', 'buddypress') ?></option> … … 878 1160 } 879 1161 880 1162 /** 1163 * Output the dropdown for bulk management of messages. 1164 * 1165 * @since BuddyPress (2.2.0) 1166 */ 1167 function bp_messages_bulk_management_dropdown() { 1168 ?> 1169 <label class="bp-screen-reader-text" for="messages-select"><?php _e( 'Select Bulk Action', 'buddypress' ); ?></label> 1170 <select name="messages_bulk_action" id="messages-select"> 1171 <option value="" selected="selected"><?php _e( 'Bulk Actions', 'buddypress' ); ?></option> 1172 <option value="read"><?php _e( 'Mark read', 'buddypress' ); ?></option> 1173 <option value="unread"><?php _e( 'Mark unread', 'buddypress' ); ?></option> 1174 <option value="delete"><?php _e( 'Delete', 'buddypress' ); ?></option> 1175 </select> 1176 <input type="submit" id="messages-bulk-manage" class="button action" value="<?php esc_attr_e( 'Apply', 'buddypress' ); ?>"> 1177 <?php 1178 } 1179 1180 /** 881 1181 * Return whether or not the notice is currently active. 882 1182 * 883 1183 * @since BuddyPress (1.6.0) -
src/bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php
18 18 19 19 <?php do_action( 'bp_before_member_messages_threads' ); ?> 20 20 21 <table id="message-threads" class="messages-notices"> 22 <?php while ( bp_message_threads() ) : bp_message_thread(); ?> 21 <form action="<?php echo bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ?>/bulk-manage/" method="post" id="messages-bulk-management"> 23 22 24 <tr id="m-<?php bp_message_thread_id(); ?>" class="<?php bp_message_css_class(); ?><?php if ( bp_message_thread_has_unread() ) : ?> unread<?php else: ?> read<?php endif; ?>"> 25 <td width="1%" class="thread-count"> 26 <span class="unread-count"><?php bp_message_thread_unread_count(); ?></span> 27 </td> 28 <td width="1%" class="thread-avatar"><?php bp_message_thread_avatar(); ?></td> 23 <table id="message-threads" class="messages-notices"> 29 24 30 <?php if ( 'sentbox' != bp_current_action() ) : ?> 31 <td width="30%" class="thread-from"> 32 <?php _e( 'From:', 'buddypress' ); ?> <?php bp_message_thread_from(); ?><br /> 33 <span class="activity"><?php bp_message_thread_last_post_date(); ?></span> 34 </td> 35 <?php else: ?> 36 <td width="30%" class="thread-from"> 37 <?php _e( 'To:', 'buddypress' ); ?> <?php bp_message_thread_to(); ?><br /> 38 <span class="activity"><?php bp_message_thread_last_post_date(); ?></span> 39 </td> 40 <?php endif; ?> 25 <thead> 26 <tr> 27 <th><label class="bp-screen-reader-text" for="select-all-messages"><?php _e( 'Select all', 'buddypress' ); ?></label><input id="select-all-messages" type="checkbox"></th> 28 <th><?php _e( 'From', 'buddypress' ); ?></th> 29 <th><?php _e( 'Subject', 'buddypress' ); ?></th> 30 <th><?php _e( 'Actions', 'buddypress' ); ?></th> 31 </tr> 32 </thead> 41 33 42 <td width="50%" class="thread-info"> 43 <p><a href="<?php bp_message_thread_view_link(); ?>" title="<?php esc_attr_e( "View Message", "buddypress" ); ?>"><?php bp_message_thread_subject(); ?></a></p> 44 <p class="thread-excerpt"><?php bp_message_thread_excerpt(); ?></p> 45 </td> 34 <tbody> 46 35 47 <?php do_action( 'bp_messages_inbox_list_item'); ?>36 <?php while ( bp_message_threads() ) : bp_message_thread(); ?> 48 37 49 <td width="13%" class="thread-options"> 50 <input type="checkbox" name="message_ids[]" value="<?php bp_message_thread_id(); ?>" /> 51 <a class="button confirm" href="<?php bp_message_thread_delete_link(); ?>" title="<?php esc_attr_e( "Delete Conversation", "buddypress" ); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a> 52 </td> 53 </tr> 38 <tr id="m-<?php bp_message_thread_id(); ?>" class="<?php bp_message_css_class(); ?><?php if ( bp_message_thread_has_unread() ) : ?> unread<?php else: ?> read<?php endif; ?>"> 39 <td width="1%"> 40 <input type="checkbox" name="message_ids[]" class="message-check" value="<?php bp_message_thread_id(); ?>" /> 41 </td> 54 42 55 <?php endwhile; ?> 56 </table><!-- #message-threads --> 43 <?php if ( 'sentbox' != bp_current_action() ) : ?> 44 <td width="40%" class="thread-from"> 45 <?php bp_message_thread_avatar( array( 'width' => 25, 'height' => 25 ) ); ?> 46 <?php _e( 'From:', 'buddypress' ); ?> <?php bp_message_thread_from(); ?> 47 <?php bp_message_thread_total_and_unread_count( bp_get_message_thread_id() ); ?> 48 <span class="activity"><?php bp_message_thread_last_post_date(); ?></span> 49 </td> 50 <?php else: ?> 51 <td width="40%" class="thread-from"> 52 <?php bp_message_thread_avatar( array( 'width' => 25, 'height' => 25 ) ); ?> 53 <?php _e( 'To:', 'buddypress' ); ?> <?php bp_message_thread_to(); ?> 54 <?php bp_message_thread_total_and_unread_count( bp_get_message_thread_id() ); ?> 55 <span class="activity"><?php bp_message_thread_last_post_date(); ?></span> 56 </td> 57 <?php endif; ?> 57 58 58 <div class="messages-options-nav"> 59 <?php bp_messages_options(); ?> 60 </div><!-- .messages-options-nav --> 59 <td width="46%" class="thread-info"> 60 <p><a href="<?php bp_message_thread_view_link(); ?>" title="<?php esc_attr_e( "View Message", "buddypress" ); ?>"><?php bp_message_thread_subject(); ?></a></p> 61 <p class="thread-excerpt"><?php bp_message_thread_excerpt(); ?></p> 62 </td> 61 63 64 <?php do_action( 'bp_messages_inbox_list_item' ); ?> 65 66 <td width="13%" class="thread-options"> 67 <?php bp_the_message_thread_action_links(); ?> 68 </td> 69 </tr> 70 71 <?php endwhile; ?> 72 73 </tbody> 74 75 </table><!-- #message-threads --> 76 77 <div class="messages-options-nav"> 78 <?php bp_messages_bulk_management_dropdown(); ?> 79 </div><!-- .messages-options-nav --> 80 81 <?php wp_nonce_field( 'messages_bulk_nonce', 'messages_bulk_nonce' ); ?> 82 </form> 83 62 84 <?php do_action( 'bp_after_member_messages_threads' ); ?> 63 85 64 86 <?php do_action( 'bp_after_member_messages_options' ); ?> -
src/bp-templates/bp-legacy/css/buddypress.css
737 737 body.no-js #buddypress #message-type-select, 738 738 body.no-js #buddypress #delete_inbox_messages, 739 739 body.no-js #buddypress #delete_sentbox_messages, 740 body.no-js #buddypress # notifications-bulk-management #select-all-notifications {740 body.no-js #buddypress #messages-bulk-management #select-all-messages { 741 741 display: none; 742 742 } 743 743 #buddypress .standard-form input:focus, … … 973 973 } 974 974 #buddypress table#message-threads { 975 975 clear: both; 976 margin: 0;977 976 width: auto; 978 977 } 979 978 #buddypress table.profile-fields { … … 1383 1382 border-bottom: 1px solid #ffe8c4; 1384 1383 font-weight: bold; 1385 1384 } 1385 #buddypress table#message-threads tr.unread td .thread-excerpt, 1386 #buddypress table#message-threads tr.unread td .activity, 1387 #buddypress table#message-threads tr.unread td.thread-options { 1388 font-weight: normal; 1389 } 1386 1390 #buddypress li span.unread-count, 1387 1391 #buddypress tr.unread span.unread-count { 1388 1392 background: #dd0000; … … 1394 1398 padding: 1px 6px; 1395 1399 color: #fff; 1396 1400 } 1397 #buddypress div.messages-options-nav {1398 background: #eee;1399 font-size: 80%;1400 margin: 0;1401 padding: 5px 15px;1402 text-align: right;1403 }1404 1401 #buddypress div#message-thread div.message-box { 1405 1402 margin: 0; 1406 1403 padding: 15px; -
src/bp-templates/bp-legacy/js/buddypress.js
1525 1525 return false; 1526 1526 }); 1527 1527 1528 /* Selecting/Deselecting all messaes */ 1529 jq('#select-all-messages').click(function(event) { 1530 if( this.checked ) { 1531 jq('.message-check').each(function() { 1532 this.checked = true; 1533 }); 1534 } else { 1535 jq('.message-check').each(function() { 1536 this.checked = false; 1537 }); 1538 } 1539 }); 1540 1541 /* Make sure a 'Bulk Action' is selected before submiting the messages bulk action form */ 1542 jq('#messages-bulk-manage').attr('disabled', 'disabled'); 1543 1544 /* Remove the disabled attribute from the messages form submit button when bulk action has a value */ 1545 jq('#messages-select').on('change', function(){ 1546 jq('#messages-bulk-manage').attr('disabled', jq(this).val().length <= 0); 1547 }); 1548 1528 1549 /* Selecting/Deselecting all notifications */ 1529 1550 jq('#select-all-notifications').click(function(event) { 1530 1551 if( this.checked ) {