Changeset 2031
- Timestamp:
- 10/05/2009 06:03:50 PM (15 years ago)
- Location:
- trunk/bp-themes/bp-sn-parent/_inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-sn-parent/_inc/ajax.php
r1997 r2031 11 11 12 12 function bp_dtheme_ajax_directory_blogs() { 13 global $bp;14 15 13 check_ajax_referer('directory_blogs'); 16 14 17 locate_template( array( ' directories/blogs/blogs-loop.php' ), true );15 locate_template( array( '/directories/blogs/blogs-loop.php' ), true ); 18 16 } 19 17 add_action( 'wp_ajax_directory_blogs', 'bp_dtheme_ajax_directory_blogs' ); … … 22 20 check_ajax_referer('directory_members'); 23 21 24 locate_template( array( ' directories/members/members-loop.php' ), true );22 locate_template( array( '/directories/members/members-loop.php' ), true ); 25 23 } 26 24 add_action( 'wp_ajax_directory_members', 'bp_dtheme_ajax_directory_members' ); 27 25 28 function bp_dtheme_ajax_friends_search() { 29 global $bp; 30 31 check_ajax_referer( 'friends_search' ); 32 33 locate_template( array( 'directories/friends/friends-loop.php' ), true ); 34 } 35 add_action( 'wp_ajax_friends_search', 'bp_dtheme_ajax_friends_search' ); 26 function bp_dtheme_ajax_directory_groups() { 27 check_ajax_referer('directory_groups'); 28 29 locate_template( array( 'directories/groups/groups-loop.php' ), true ); 30 } 31 add_action( 'wp_ajax_directory_groups', 'bp_dtheme_ajax_directory_groups' ); 36 32 37 33 function bp_dtheme_ajax_addremove_friend() { … … 63 59 } 64 60 add_action( 'wp_ajax_addremove_friend', 'bp_dtheme_ajax_addremove_friend' ); 61 62 function bp_dtheme_ajax_my_friends() { 63 locate_template( array( 'friends/friends-loop.php' ), true ); 64 } 65 add_action( 'wp_ajax_my_friends_search', 'bp_dtheme_ajax_my_friends' ); 65 66 66 67 function bp_dtheme_ajax_invite_user() { … … 202 203 } 203 204 add_action( 'wp_ajax_get_group_members_admin', 'bp_dtheme_ajax_member_admin_list' ); 204 205 function bp_dtheme_ajax_directory_groups() {206 global $bp;207 208 check_ajax_referer('directory_groups');209 210 locate_template( array( 'directories/groups/groups-loop.php' ), true );211 }212 add_action( 'wp_ajax_directory_groups', 'bp_dtheme_ajax_directory_groups' );213 205 214 206 function bp_dtheme_ajax_joinleave_group() { -
trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js
r1956 r2031 202 202 ); 203 203 204 j(" div#pag a").livequery('click',204 j(".friends div#pag a").livequery('click', 205 205 function() { 206 206 j('.ajax-loader').toggle(); … … 208 208 var frpage = j(this).attr('href'); 209 209 frpage = frpage.split('='); 210 211 j.post( ajaxurl, { 212 action: ' friends_search',210 211 j.post( ajaxurl, { 212 action: 'my_friends_search', 213 213 'cookie': encodeURIComponent(document.cookie), 214 214 '_wpnonce': j("input#_wpnonce_friend_search").val(), 215 'initiator_id': j("input#initiator").val(),216 215 'frpage': frpage[1], 217 216 … … 236 235 237 236 j("input#friend-search-box").keyup( 238 239 237 function(e) { 240 238 if ( e.which == 13 ) { … … 242 240 243 241 j.post( ajaxurl, { 244 action: ' friends_search',242 action: 'my_friends_search', 245 243 'cookie': encodeURIComponent(document.cookie), 246 244 '_wpnonce': j("input#_wpnonce_friend_search").val(), 247 245 248 246 'friend-search-box': j("#friend-search-box").val() 249 247 }, 250 248 function(response) 251 { 249 { 252 250 response = response.substr( 0, response.length - 1 ); 253 251 254 252 j("div#friends-loop").fadeOut(200, 255 253 function() { … … 259 257 } 260 258 ); 261 262 259 }); 263 260 264 261 return false; 265 262 } … … 406 403 ); 407 404 408 j("form#group-search-form ").submit(405 j("form#group-search-form, form#friend-search-form").submit( 409 406 function() { 410 407 return false; … … 475 472 ); 476 473 477 j(" div#pag a").livequery('click',474 j(".groups div#pag a").livequery('click', 478 475 function() { 479 476 j('.ajax-loader').toggle();
Note: See TracChangeset
for help on using the changeset viewer.