Changeset 6326
- Timestamp:
- 09/11/2012 05:53:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
bp-activity/bp-activity-actions.php (modified) (1 diff)
-
bp-activity/bp-activity-notifications.php (modified) (1 diff)
-
bp-loader.php (modified) (1 diff)
-
bp-themes/bp-default/_inc/ajax.php (modified) (1 diff)
-
bp-themes/bp-default/_inc/global.js (modified) (3 diffs)
-
bp-themes/bp-legacy/buddypress-functions.php (modified) (3 diffs)
-
bp-themes/bp-legacy/js/buddypress.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-actions.php
r6259 r6326 326 326 327 327 $comment_id = bp_activity_new_comment( array( 328 'content' => $content,328 'content' => $content, 329 329 'activity_id' => $activity_id, 330 'parent_id' => $parent_id330 'parent_id' => false 331 331 )); 332 332 -
trunk/bp-activity/bp-activity-notifications.php
r5929 r6326 189 189 * author of the immediate parent comment. 190 190 */ 191 if ( $activity_id == $parent_id)191 if ( empty( $parent_id ) || ( $activity_id == $parent_id ) ) 192 192 return false; 193 193 -
trunk/bp-loader.php
r6305 r6326 267 267 /** Versions **********************************************************/ 268 268 269 $this->version = '1.7-bleeding-63 05';269 $this->version = '1.7-bleeding-6326'; 270 270 $this->db_version = 6066; 271 271 -
trunk/bp-themes/bp-default/_inc/ajax.php
r6285 r6326 76 76 } 77 77 } 78 add_action( ' bp_after_setup_theme', 'bp_dtheme_register_actions', 20 );78 add_action( 'after_setup_theme', 'bp_dtheme_register_actions', 20 ); 79 79 80 80 /** -
trunk/bp-themes/bp-default/_inc/global.js
r6172 r6326 400 400 /* Activity comment posting */ 401 401 if ( target.attr('name') == 'ac_form_submit' ) { 402 var form = target.parent().parent();402 var form = target.parents( 'form' ); 403 403 var form_parent = form.parent(); 404 var form_id = form.attr('id').split('-');404 var form_id = form.attr('id').split('-'); 405 405 406 406 if ( !form_parent.hasClass('activity-comments') ) { … … 412 412 413 413 /* Hide any error messages */ 414 jq( 'form#' + form + ' div.error').hide();414 jq( 'form#' + form.attr('id') + ' div.error').hide(); 415 415 target.addClass('loading').prop('disabled', true); 416 416 … … 453 453 } 454 454 ); 455 jq( 'form#' + form + ' textarea').val('');455 jq( 'form#' + form.attr('id') + ' textarea').val(''); 456 456 457 457 /* Increase the "Reply (X)" button count */ -
trunk/bp-themes/bp-legacy/buddypress-functions.php
r6323 r6326 94 94 add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization 95 95 add_action( 'bp_head', array( $this, 'head_scripts' ) ); // Output some extra JS in the <head> 96 97 /** Ajax **************************************************************/ 98 99 $actions = array( 100 101 // Directory filters 102 'blogs_filter' => 'bp_legacy_theme_object_template_loader', 103 'forums_filter' => 'bp_legacy_theme_object_template_loader', 104 'groups_filter' => 'bp_legacy_theme_object_template_loader', 105 'members_filter' => 'bp_legacy_theme_object_template_loader', 106 'messages_filter' => 'bp_legacy_theme_messages_template_loader', 107 108 // Friends 109 'accept_friendship' => 'bp_legacy_theme_ajax_accept_friendship', 110 'addremove_friend' => 'bp_legacy_theme_ajax_addremove_friend', 111 'reject_friendship' => 'bp_legacy_theme_ajax_reject_friendship', 112 113 // Activity 114 'activity_get_older_updates' => 'bp_legacy_theme_activity_template_loader', 115 'activity_mark_fav' => 'bp_legacy_theme_mark_activity_favorite', 116 'activity_mark_unfav' => 'bp_legacy_theme_unmark_activity_favorite', 117 'activity_widget_filter' => 'bp_legacy_theme_activity_template_loader', 118 'delete_activity' => 'bp_legacy_theme_delete_activity', 119 'delete_activity_comment' => 'bp_legacy_theme_delete_activity_comment', 120 'get_single_activity_content' => 'bp_legacy_theme_get_single_activity_content', 121 'new_activity_comment' => 'bp_legacy_theme_new_activity_comment', 122 'post_update' => 'bp_legacy_theme_post_update', 123 'bp_spam_activity' => 'bp_legacy_theme_spam_activity', 124 'bp_spam_activity_comment' => 'bp_legacy_theme_spam_activity', 125 126 // Groups 127 'groups_invite_user' => 'bp_legacy_theme_ajax_invite_user', 128 'joinleave_group' => 'bp_legacy_theme_ajax_joinleave_group', 129 130 // Messages 131 'messages_autocomplete_results' => 'bp_legacy_theme_ajax_messages_autocomplete_results', 132 'messages_close_notice' => 'bp_legacy_theme_ajax_close_notice', 133 'messages_delete' => 'bp_legacy_theme_ajax_messages_delete', 134 'messages_markread' => 'bp_legacy_theme_ajax_message_markread', 135 'messages_markunread' => 'bp_legacy_theme_ajax_message_markunread', 136 'messages_send_reply' => 'bp_legacy_theme_ajax_messages_send_reply', 137 ); 138 139 /** 140 * Register all of these AJAX handlers 141 * 142 * The "wp_ajax_" action is used for logged in users, and "wp_ajax_nopriv_" 143 * executes for users that aren't logged in. This is for backpat with BP <1.6. 144 */ 145 foreach( $actions as $name => $function ) { 146 add_action( 'wp_ajax_' . $name, $function ); 147 add_action( 'wp_ajax_nopriv_' . $name, $function ); 148 } 149 150 add_filter( 'bp_ajax_querystring', 'bp_legacy_theme_ajax_querystring', 10, 2 ); 96 151 97 152 /** Override **********************************************************/ … … 214 269 215 270 /** 216 * AJAX Functions217 *218 * All of these functions enhance the responsiveness of the user interface in219 * the legacy theme by adding AJAX functionality.220 *221 * For more information on how the custom AJAX functions work, see222 * http://codex.wordpress.org/AJAX_in_Plugins.223 *224 * @package BuddyPress225 * @since BuddyPress (1.2)226 * @subpackage BP_Legacy227 */228 229 /**230 * Register AJAX handlers for BP Legacy theme functionality.231 *232 * This function is registered to the after_setup_theme hook with priority 20 as233 * this file is included in a function hooked to after_setup_theme at priority 10.234 *235 * @since BuddyPress (1.6)236 */237 function bp_legacy_theme_register_actions() {238 $actions = array(239 // Directory filters240 'blogs_filter' => 'bp_legacy_theme_object_template_loader',241 'forums_filter' => 'bp_legacy_theme_object_template_loader',242 'groups_filter' => 'bp_legacy_theme_object_template_loader',243 'members_filter' => 'bp_legacy_theme_object_template_loader',244 'messages_filter' => 'bp_legacy_theme_messages_template_loader',245 246 // Friends247 'accept_friendship' => 'bp_legacy_theme_ajax_accept_friendship',248 'addremove_friend' => 'bp_legacy_theme_ajax_addremove_friend',249 'reject_friendship' => 'bp_legacy_theme_ajax_reject_friendship',250 251 // Activity252 'activity_get_older_updates' => 'bp_legacy_theme_activity_template_loader',253 'activity_mark_fav' => 'bp_legacy_theme_mark_activity_favorite',254 'activity_mark_unfav' => 'bp_legacy_theme_unmark_activity_favorite',255 'activity_widget_filter' => 'bp_legacy_theme_activity_template_loader',256 'delete_activity' => 'bp_legacy_theme_delete_activity',257 'delete_activity_comment' => 'bp_legacy_theme_delete_activity_comment',258 'get_single_activity_content' => 'bp_legacy_theme_get_single_activity_content',259 'new_activity_comment' => 'bp_legacy_theme_new_activity_comment',260 'post_update' => 'bp_legacy_theme_post_update',261 'bp_spam_activity' => 'bp_legacy_theme_spam_activity',262 'bp_spam_activity_comment' => 'bp_legacy_theme_spam_activity',263 264 // Groups265 'groups_invite_user' => 'bp_legacy_theme_ajax_invite_user',266 'joinleave_group' => 'bp_legacy_theme_ajax_joinleave_group',267 268 // Messages269 'messages_autocomplete_results' => 'bp_legacy_theme_ajax_messages_autocomplete_results',270 'messages_close_notice' => 'bp_legacy_theme_ajax_close_notice',271 'messages_delete' => 'bp_legacy_theme_ajax_messages_delete',272 'messages_markread' => 'bp_legacy_theme_ajax_message_markread',273 'messages_markunread' => 'bp_legacy_theme_ajax_message_markunread',274 'messages_send_reply' => 'bp_legacy_theme_ajax_messages_send_reply',275 );276 277 /**278 * Register all of these AJAX handlers279 *280 * The "wp_ajax_" action is used for logged in users, and "wp_ajax_nopriv_"281 * executes for users that aren't logged in. This is for backpat with BP <1.6.282 */283 foreach( $actions as $name => $function ) {284 add_action( 'wp_ajax_' . $name, $function );285 add_action( 'wp_ajax_nopriv_' . $name, $function );286 }287 }288 add_action( 'bp_after_setup_theme', 'bp_legacy_theme_register_actions', 20 );289 290 /**291 271 * This function looks scarier than it actually is. :) 292 272 * Each object loop (activity/members/groups/blogs/forums) contains default … … 371 351 return apply_filters( 'bp_legacy_theme_ajax_querystring', $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras ); 372 352 } 373 add_filter( 'bp_ajax_querystring', 'bp_legacy_theme_ajax_querystring', 10, 2 );374 353 375 354 /** -
trunk/bp-themes/bp-legacy/js/buddypress.js
r6284 r6326 412 412 413 413 /* Hide any error messages */ 414 jq( 'form#' + form + ' div.error').hide();414 jq( 'form#' + form.attr('id') + ' div.error').hide(); 415 415 target.addClass('loading').prop('disabled', true); 416 416 … … 453 453 } 454 454 ); 455 jq( 'form#' + form + ' textarea').val('');455 jq( 'form#' + form.attr('id') + ' textarea').val(''); 456 456 457 457 /* Increase the "Reply (X)" button count */
Note: See TracChangeset
for help on using the changeset viewer.