Changeset 2423
- Timestamp:
- 01/24/2010 02:38:08 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
bp-core/bp-core-templatetags.php (modified) (1 diff)
-
bp-themes/bp-default/_inc/ajax.php (modified) (5 diffs)
-
bp-themes/bp-default/_inc/css/default.css (modified) (2 diffs)
-
bp-themes/bp-default/_inc/global.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r2422 r2423 485 485 $link = $bp->displayed_user->domain . $user_nav_item['link']; 486 486 487 echo apply_filters( 'bp_get_displayed_user_nav_' . $user_nav_item['css_id'], '<li id="' . $user_nav_item['css_id'] . '-personal " ' . $selected . '><a id="user-' . $user_nav_item['css_id'] . '" href="' . $link . '">' . $user_nav_item['name'] . '</a></li>', &$user_nav_item );487 echo apply_filters( 'bp_get_displayed_user_nav_' . $user_nav_item['css_id'], '<li id="' . $user_nav_item['css_id'] . '-personal-li" ' . $selected . '><a id="user-' . $user_nav_item['css_id'] . '" href="' . $link . '">' . $user_nav_item['name'] . '</a></li>', &$user_nav_item ); 488 488 } 489 489 } -
trunk/bp-themes/bp-default/_inc/ajax.php
r2422 r2423 166 166 add_action( 'wp_ajax_delete_activity', 'bp_dtheme_delete_activity' ); 167 167 168 function bp_dtheme_activity_loop( $ type = 'all', $filter = false, $query_string = false, $per_page = 20, $page = 1 ) {168 function bp_dtheme_activity_loop( $scope = 'all', $filter = false, $query_string = false, $per_page = 20, $page = 1 ) { 169 169 global $bp; 170 170 … … 174 174 $query_string = 'user_id=' . $bp->displayed_user->id; 175 175 } else { 176 /* Make sure a type is set. */177 if ( empty($ type) )176 /* Make sure a scope is set. */ 177 if ( empty($scope) ) 178 178 $type = 'all'; 179 179 180 180 $feed_url = site_url( BP_ACTIVITY_SLUG . '/feed/' ); 181 181 182 switch ( $ type ) {182 switch ( $scope ) { 183 183 case 'friends': 184 184 $friend_ids = implode( ',', friends_get_friend_user_ids( $bp->loggedin_user->id ) ); … … 229 229 230 230 /* Add the comments param */ 231 if ( $bp->displayed_user->id || 'atme' == $ type )231 if ( $bp->displayed_user->id || 'atme' == $scope ) 232 232 $query_string .= '&display_comments=stream'; 233 233 else … … 243 243 $query_string = implode( '&', $new_args ) . '&page=' . $page; 244 244 245 $bp->ajax_querystring = apply_filters( 'bp_dtheme_ajax_querystring_activity_filter', $query_string, $ type );245 $bp->ajax_querystring = apply_filters( 'bp_dtheme_ajax_querystring_activity_filter', $query_string, $scope ); 246 246 $result['query_string'] = $bp->ajax_querystring; 247 247 $result['feed_url'] = apply_filters( 'bp_dtheme_ajax_feed_url', $feed_url ); … … 257 257 258 258 function bp_dtheme_ajax_widget_filter() { 259 bp_dtheme_activity_loop( $_POST[' type'], $_POST['filter'] );259 bp_dtheme_activity_loop( $_POST['scope'], $_POST['filter'] ); 260 260 } 261 261 add_action( 'wp_ajax_activity_widget_filter', 'bp_dtheme_ajax_widget_filter' ); -
trunk/bp-themes/bp-default/_inc/css/default.css
r2412 r2423 604 604 } 605 605 606 /* > AJAX Loaders607 -------------------------------------------------------------- */608 609 .ajax-loader {610 background: url( ../images/ajax-loader.gif ) center left no-repeat !important;611 padding: 8px;612 display: none;613 }614 615 a.loading {616 background-image: url( ../images/ajax-loader.gif );617 background-position: 95% 50%;618 padding-right: 25px;619 background-repeat: no-repeat;620 }621 622 606 /* > Buttons 623 607 -------------------------------------------------------------- */ … … 666 650 } 667 651 652 /* > AJAX Loaders 653 -------------------------------------------------------------- */ 654 655 .ajax-loader { 656 background: url( ../images/ajax-loader.gif ) center left no-repeat !important; 657 padding: 8px; 658 display: none; 659 } 660 661 a.loading { 662 background-image: url( ../images/ajax-loader.gif ) !important; 663 background-position: 95% 50% !important; 664 background-repeat: no-repeat !important; 665 padding-right: 25px !important; 666 } 667 668 668 /* > Input Forms 669 669 -------------------------------------------------------------- */ -
trunk/bp-themes/bp-default/_inc/global.js
r2422 r2423 8 8 /* Activity */ 9 9 if ( j('div.activity').length && !j('div.activity').hasClass('no-ajax') ) 10 bp_activity_request( j.cookie('bp-activity- type'), j.cookie('bp-activity-filter') );10 bp_activity_request( j.cookie('bp-activity-scope'), j.cookie('bp-activity-filter') ); 11 11 12 12 /* Members */ … … 104 104 105 105 /* Activity Stream Tabs */ 106 var type = target.attr('id').substr( 9, target.attr('id').length );106 var scope = target.attr('id').substr( 9, target.attr('id').length ); 107 107 var filter = j("#activity-filter-select select").val(); 108 108 109 if ( type == 'atme' )109 if ( scope == 'atme' ) 110 110 j( 'li#' + target.attr('id') + ' a strong' ).remove(); 111 111 112 bp_activity_request( type, filter, target);112 bp_activity_request(scope, filter, target); 113 113 114 114 return false; … … 120 120 121 121 if ( !selected_tab.length ) 122 var type = 'all';122 var scope = 'all'; 123 123 else 124 var type = selected_tab.attr('id').substr( 9, selected_tab.attr('id').length );124 var scope = selected_tab.attr('id').substr( 9, selected_tab.attr('id').length ); 125 125 126 126 var filter = j(this).val(); 127 127 128 bp_activity_request( type, filter);128 bp_activity_request(scope, filter); 129 129 130 130 return false; … … 245 245 246 246 /* Activity Loop Requesting */ 247 function bp_activity_request( type, filter) {248 if ( null == type )249 var type = 'all';247 function bp_activity_request(scope, filter) { 248 if ( null == scope ) 249 var scope = 'all'; 250 250 251 251 if ( null == filter ) … … 253 253 254 254 /* Save the type and filter to a session cookie */ 255 j.cookie( 'bp-activity- type', type, null );255 j.cookie( 'bp-activity-scope', scope, null ); 256 256 j.cookie( 'bp-activity-filter', filter, null ); 257 257 j.cookie( 'bp-activity-oldestpage', 1 ); … … 261 261 j(this).removeClass('selected'); 262 262 }); 263 j('li#activity-' + type + ', div.item-list-tabs li.current').addClass('selected');263 j('li#activity-' + scope + ', div.item-list-tabs li.current').addClass('selected'); 264 264 j('div.item-list-tabs li.selected').addClass('loading'); 265 265 j('#activity-filter-select select option[value=' + filter + ']').attr( 'selected', 'selected' ); … … 272 272 'cookie': encodeURIComponent(document.cookie), 273 273 '_wpnonce_activity_filter': j("input#_wpnonce_activity_filter").val(), 274 ' type': type,274 'scope': scope, 275 275 'filter': filter 276 276 },
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)