<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][6542] trunk/bp-templates/bp-legacy/js/buddypress.js: BP Legacy (js):</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/6542">6542</a></dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2012-11-30 23:22:59 +0000 (Fri, 30 Nov 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>BP Legacy (js):
* Speed up ID look-ups by not including an element type (id's are unique and indexed already.)</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbptemplatesbplegacyjsbuddypressjs">trunk/bp-templates/bp-legacy/js/buddypress.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbptemplatesbplegacyjsbuddypressjs"></a>
<div class="modfile"><h4>Modified: trunk/bp-templates/bp-legacy/js/buddypress.js (6541 => 6542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-templates/bp-legacy/js/buddypress.js        2012-11-30 23:19:30 UTC (rev 6541)
+++ trunk/bp-templates/bp-legacy/js/buddypress.js        2012-11-30 23:22:59 UTC (rev 6542)
</span><span class="lines">@@ -21,18 +21,18 @@
</span><span class="cx">         bp_init_objects( objects );
</span><span class="cx">
</span><span class="cx">         /* @mention Compose Scrolling */
</span><del>-        if ( jq.query.get('r') && jq('textarea#whats-new').length ) {
</del><ins>+        if ( jq.query.get('r') && jq('#whats-new').length ) {
</ins><span class="cx">                 jq('#whats-new-options').animate({
</span><span class="cx">                         height:'40px'
</span><span class="cx">                 });
</span><del>-                jq("form#whats-new-form textarea").animate({
</del><ins>+                jq("#whats-new-form textarea").animate({
</ins><span class="cx">                         height:'50px'
</span><span class="cx">                 });
</span><del>-                jq.scrollTo( jq('textarea#whats-new'), 500, {
</del><ins>+                jq.scrollTo( jq('#whats-new'), 500, {
</ins><span class="cx">                         offset:-125,
</span><span class="cx">                         easing:'easeOutQuad'
</span><span class="cx">                 } );
</span><del>-                jq('textarea#whats-new').focus();
</del><ins>+                jq('#whats-new').focus();
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /**** Activity Posting ********************************************************/
</span><span class="lines">@@ -42,14 +42,14 @@
</span><span class="cx">                 jq("#whats-new-options").animate({
</span><span class="cx">                         height:'40px'
</span><span class="cx">                 });
</span><del>-                jq("form#whats-new-form textarea").animate({
</del><ins>+                jq("#whats-new-form textarea").animate({
</ins><span class="cx">                         height:'50px'
</span><span class="cx">                 });
</span><span class="cx">                 jq("#aw-whats-new-submit").prop("disabled", false);
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         /* New posts */
</span><del>-        jq("input#aw-whats-new-submit").click( function() {
</del><ins>+        jq("#aw-whats-new-submit").click( function() {
</ins><span class="cx">                 var button = jq(this);
</span><span class="cx">                 var form = button.parent().parent().parent().parent();
</span><span class="cx">
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">                 /* Default POST values */
</span><span class="cx">                 var object = '';
</span><span class="cx">                 var item_id = jq("#whats-new-post-in").val();
</span><del>-                var content = jq("textarea#whats-new").val();
</del><ins>+                var content = jq("#whats-new").val();
</ins><span class="cx">
</span><span class="cx">                 /* Set object for non-profile posts */
</span><span class="cx">                 if ( item_id > 0 ) {
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">                 jq.post( ajaxurl, {
</span><span class="cx">                         action: 'post_update',
</span><span class="cx">                         'cookie': encodeURIComponent(document.cookie),
</span><del>-                        '_wpnonce_post_update': jq("input#_wpnonce_post_update").val(),
</del><ins>+                        '_wpnonce_post_update': jq("#_wpnonce_post_update").val(),
</ins><span class="cx">                         'content': content,
</span><span class="cx">                         'object': object,
</span><span class="cx">                         'item_id': item_id,
</span><span class="lines">@@ -93,22 +93,22 @@
</span><span class="cx">                         /* Check for errors and append if found. */
</span><span class="cx">                         if ( response[0] + response[1] == '-1' ) {
</span><span class="cx">                                 form.prepend( response.substr( 2, response.length ) );
</span><del>-                                jq( 'form#' + form.attr('id') + ' div.error').hide().fadeIn( 200 );
</del><ins>+                                jq( '#' + form.attr('id') + ' div.error').hide().fadeIn( 200 );
</ins><span class="cx">                         } else {
</span><span class="cx">                                 if ( 0 == jq("ul.activity-list").length ) {
</span><span class="cx">                                         jq("div.error").slideUp(100).remove();
</span><del>-                                        jq("div#message").slideUp(100).remove();
</del><ins>+                                        jq("#message").slideUp(100).remove();
</ins><span class="cx">                                         jq("div.activity").append( '<ul id="activity-stream" class="activity-list item-list">' );
</span><span class="cx">                                 }
</span><span class="cx">
</span><del>-                                jq("ul#activity-stream").prepend(response);
-                                jq("ul#activity-stream li:first").addClass('new-update');
</del><ins>+                                jq("#activity-stream").prepend(response);
+                                jq("#activity-stream li:first").addClass('new-update');
</ins><span class="cx">
</span><span class="cx">                                 if ( 0 != jq("#latest-update").length ) {
</span><del>-                                        var l = jq("ul#activity-stream li.new-update .activity-content .activity-inner p").html();
-                                        var v = jq("ul#activity-stream li.new-update .activity-content .activity-header p a.view").attr('href');
</del><ins>+                                        var l = jq("#activity-stream li.new-update .activity-content .activity-inner p").html();
+                                        var v = jq("#activity-stream li.new-update .activity-content .activity-header p a.view").attr('href');
</ins><span class="cx">
</span><del>-                                        var ltext = jq("ul#activity-stream li.new-update .activity-content .activity-inner p").text();
</del><ins>+                                        var ltext = jq("#activity-stream li.new-update .activity-content .activity-inner p").text();
</ins><span class="cx">
</span><span class="cx">                                         var u = '';
</span><span class="cx">                                         if ( ltext != '' )
</span><span class="lines">@@ -124,13 +124,13 @@
</span><span class="cx">
</span><span class="cx">                                 jq("li.new-update").hide().slideDown( 300 );
</span><span class="cx">                                 jq("li.new-update").removeClass( 'new-update' );
</span><del>-                                jq("textarea#whats-new").val('');
</del><ins>+                                jq("#whats-new").val('');
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         jq("#whats-new-options").animate({
</span><span class="cx">                                 height:'0px'
</span><span class="cx">                         });
</span><del>-                        jq("form#whats-new-form textarea").animate({
</del><ins>+                        jq("#whats-new-form textarea").animate({
</ins><span class="cx">                                 height:'20px'
</span><span class="cx">                         });
</span><span class="cx">                         jq("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">                 var filter = jq("#activity-filter-select select").val();
</span><span class="cx">
</span><span class="cx">                 if ( scope == 'mentions' )
</span><del>-                        jq( 'li#' + target.attr('id') + ' a strong' ).remove();
</del><ins>+                        jq( '#' + target.attr('id') + ' a strong' ).remove();
</ins><span class="cx">
</span><span class="cx">                 bp_activity_request(scope, filter);
</span><span class="cx">
</span><span class="lines">@@ -208,24 +208,24 @@
</span><span class="cx">                                 });
</span><span class="cx">
</span><span class="cx">                                 if ( 'fav' == type ) {
</span><del>-                                        if ( !jq('.item-list-tabs li#activity-favorites').length )
-                                                jq('.item-list-tabs ul li#activity-mentions').before( '<li id="activity-favorites"><a href="#">' + BP_DTheme.my_favs + ' <span>0</span></a></li>');
</del><ins>+                                        if ( !jq('.item-list-tabs #activity-favorites').length )
+                                                jq('.item-list-tabs ul #activity-mentions').before( '<li id="activity-favorites"><a href="#">' + BP_DTheme.my_favs + ' <span>0</span></a></li>');
</ins><span class="cx">
</span><span class="cx">                                         target.removeClass('fav');
</span><span class="cx">                                         target.addClass('unfav');
</span><span class="cx">
</span><del>-                                        jq('.item-list-tabs ul li#activity-favorites span').html( Number( jq('.item-list-tabs ul li#activity-favorites span').html() ) + 1 );
</del><ins>+                                        jq('.item-list-tabs ul #activity-favorites span').html( Number( jq('.item-list-tabs ul #activity-favorites span').html() ) + 1 );
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         target.removeClass('unfav');
</span><span class="cx">                                         target.addClass('fav');
</span><span class="cx">
</span><del>-                                        jq('.item-list-tabs ul li#activity-favorites span').html( Number( jq('.item-list-tabs ul li#activity-favorites span').html() ) - 1 );
</del><ins>+                                        jq('.item-list-tabs ul #activity-favorites span').html( Number( jq('.item-list-tabs ul #activity-favorites span').html() ) - 1 );
</ins><span class="cx">
</span><del>-                                        if ( !Number( jq('.item-list-tabs ul li#activity-favorites span').html() ) ) {
-                                                if ( jq('.item-list-tabs ul li#activity-favorites').hasClass('selected') )
</del><ins>+                                        if ( !Number( jq('.item-list-tabs ul #activity-favorites span').html() ) ) {
+                                                if ( jq('.item-list-tabs ul #activity-favorites').hasClass('selected') )
</ins><span class="cx">                                                         bp_activity_request( null, null );
</span><span class="cx">
</span><del>-                                                jq('.item-list-tabs ul li#activity-favorites').remove();
</del><ins>+                                                jq('.item-list-tabs ul #activity-favorites').remove();
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx">
</span><span class="cx">                                 if ( response[0] + response[1] == '-1' ) {
</span><span class="cx">                                         li.prepend( response.substr( 2, response.length ) );
</span><del>-                                        li.children('div#message').hide().fadeIn(300);
</del><ins>+                                        li.children('#message').hide().fadeIn(300);
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         li.slideUp(300);
</span><span class="cx">                                 }
</span><span class="lines">@@ -281,7 +281,7 @@
</span><span class="cx">                         function(response) {
</span><span class="cx">                                 if ( response[0] + response[1] === '-1' ) {
</span><span class="cx">                                         li.prepend( response.substr( 2, response.length ) );
</span><del>-                                        li.children( 'div#message' ).hide().fadeIn(300);
</del><ins>+                                        li.children( '#message' ).hide().fadeIn(300);
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         li.slideUp( 300 );
</span><span class="cx">                                 }
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx">                 var type = link_id[0]; /* activity or acomment */
</span><span class="cx">
</span><span class="cx">                 var inner_class = type == 'acomment' ? 'acomment-content' : 'activity-inner';
</span><del>-                var a_inner = jq('li#' + type + '-' + a_id + ' .' + inner_class + ':first' );
</del><ins>+                var a_inner = jq('#' + type + '-' + a_id + ' .' + inner_class + ':first' );
</ins><span class="cx">                 jq(target).addClass('loading');
</span><span class="cx">
</span><span class="cx">                 jq.post( ajaxurl, {
</span><span class="lines">@@ -379,9 +379,9 @@
</span><span class="cx">                         });
</span><span class="cx">
</span><span class="cx">                         if ( ids[1] != 'comment' ) {
</span><del>-                                jq('.activity-comments li#acomment-' + c_id).append( form );
</del><ins>+                                jq('#acomment-' + c_id).append( form );
</ins><span class="cx">                         } else {
</span><del>-                                jq('li#activity-' + a_id + ' .activity-comments').append( form );
</del><ins>+                                jq('#activity-' + a_id + ' .activity-comments').append( form );
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         if ( form.parent().hasClass( 'activity-comments' ) )
</span><span class="lines">@@ -399,7 +399,7 @@
</span><span class="cx">
</span><span class="cx">                 /* Activity comment posting */
</span><span class="cx">                 if ( target.attr('name') == 'ac_form_submit' ) {
</span><del>-                        var form = target.parent().parent();
</del><ins>+                        var form = target.parents( 'form' );
</ins><span class="cx">                         var form_parent = form.parent();
</span><span class="cx">                         var form_id = form.attr('id').split('-');
</span><span class="cx">
</span><span class="lines">@@ -409,18 +409,20 @@
</span><span class="cx">                         } else {
</span><span class="cx">                                 var comment_id = form_id[2];
</span><span class="cx">                         }
</span><ins>+                        
+                        var content = jq( '#' + form.attr('id') + ' textarea' );
</ins><span class="cx">
</span><span class="cx">                         /* Hide any error messages */
</span><del>-                        jq( 'form#' + form.attr('id') + ' div.error').hide();
</del><ins>+                        jq( '#' + form.attr('id') + ' div.error').hide();
</ins><span class="cx">                         target.addClass('loading').prop('disabled', true);
</span><span class="cx">
</span><span class="cx">                         var ajaxdata = {
</span><span class="cx">                                 action: 'new_activity_comment',
</span><span class="cx">                                 'cookie': encodeURIComponent(document.cookie),
</span><del>-                                '_wpnonce_new_activity_comment': jq("input#_wpnonce_new_activity_comment").val(),
</del><ins>+                                '_wpnonce_new_activity_comment': jq("#_wpnonce_new_activity_comment").val(),
</ins><span class="cx">                                 'comment_id': comment_id,
</span><span class="cx">                                 'form_id': form_id[2],
</span><del>-                                'content': jq('form#' + form.attr('id') + ' textarea').val()
</del><ins>+                                'content': content.val()
</ins><span class="cx">                         };
</span><span class="cx">
</span><span class="cx">                         // Akismet
</span><span class="lines">@@ -452,10 +454,10 @@
</span><span class="cx">                                                                 form.parent().parent().addClass('has-comments');
</span><span class="cx">                                                         }
</span><span class="cx">                                                         );
</span><del>-                                                jq( 'form#' + form.attr('id') + ' textarea').val('');
</del><ins>+                                                jq( '#' + form.attr('id') + ' textarea').val('');
</ins><span class="cx">
</span><span class="cx">                                                 /* Increase the "Reply (X)" button count */
</span><del>-                                                jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
</del><ins>+                                                jq('#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
</ins><span class="cx">                                         }
</span><span class="cx">
</span><span class="cx">                                         jq(target).prop("disabled", false);
</span><span class="lines">@@ -497,7 +499,7 @@
</span><span class="cx">                                 if ( response[0] + response[1] == '-1' ) {
</span><span class="cx">                                         comment_li.prepend( response.substr( 2, response.length ) ).hide().fadeIn( 200 );
</span><span class="cx">                                 } else {
</span><del>-                                        var children = jq( 'li#' + comment_li.attr('id') + ' ul' ).children('li');
</del><ins>+                                        var children = jq( '#' + comment_li.attr('id') + ' ul' ).children('li');
</ins><span class="cx">                                         var child_count = 0;
</span><span class="cx">                                         jq(children).each( function() {
</span><span class="cx">                                                 if ( !jq(this).is(':hidden') )
</span><span class="lines">@@ -506,13 +508,13 @@
</span><span class="cx">                                         comment_li.fadeOut(200);
</span><span class="cx">
</span><span class="cx">                                         /* Decrease the "Reply (X)" button count */
</span><del>-                                        var count_span = jq('li#' + comment_li.parents('ul#activity-stream > li').attr('id') + ' a.acomment-reply span');
</del><ins>+                                        var count_span = jq('#' + comment_li.parents('#activity-stream > li').attr('id') + ' a.acomment-reply span');
</ins><span class="cx">                                         var new_count = count_span.html() - ( 1 + child_count );
</span><span class="cx">                                         count_span.html(new_count);
</span><span class="cx">
</span><span class="cx">                                         /* If that was the last comment for the item, remove the has-comments class to clean up the styling */
</span><span class="cx">                                         if ( 0 == new_count ) {
</span><del>-                                                jq(comment_li.parents('ul#activity-stream > li')).removeClass('has-comments');
</del><ins>+                                                jq(comment_li.parents('#activity-stream > li')).removeClass('has-comments');
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="lines">@@ -546,7 +548,7 @@
</span><span class="cx">                                         comment_li.prepend( response.substr( 2, response.length ) ).hide().fadeIn( 200 );
</span><span class="cx">
</span><span class="cx">                                 } else {
</span><del>-                                        var children = jq( 'li#' + comment_li.attr( 'id' ) + ' ul' ).children( 'li' );
</del><ins>+                                        var children = jq( '#' + comment_li.attr( 'id' ) + ' ul' ).children( 'li' );
</ins><span class="cx">                                         var child_count = 0;
</span><span class="cx">                                         jq(children).each( function() {
</span><span class="cx">                                                 if ( !jq( this ).is( ':hidden' ) ) {
</span><span class="lines">@@ -556,8 +558,8 @@
</span><span class="cx">                                         comment_li.fadeOut( 200 );
</span><span class="cx">
</span><span class="cx">                                         // Decrease the "Reply (X)" button count
</span><del>-                                        var parent_li = comment_li.parents( 'ul#activity-stream > li' );
-                                        jq( 'li#' + parent_li.attr( 'id' ) + ' a.acomment-reply span' ).html( jq( 'li#' + parent_li.attr( 'id' ) + ' a.acomment-reply span' ).html() - ( 1 + child_count ) );
</del><ins>+                                        var parent_li = comment_li.parents( '#activity-stream > li' );
+                                        jq( '#' + parent_li.attr( 'id' ) + ' a.acomment-reply span' ).html( jq( '#' + parent_li.attr( 'id' ) + ' a.acomment-reply span' ).html() - ( 1 + child_count ) );
</ins><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx">
</span><span class="lines">@@ -678,7 +680,7 @@
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         /* All pagination links run through this function */
</span><del>-        jq('div#content').click( function(event) {
</del><ins>+        jq('#content').click( function(event) {
</ins><span class="cx">                 var target = jq(event.target);
</span><span class="cx">
</span><span class="cx">                 if ( target.hasClass('button') )
</span><span class="lines">@@ -733,7 +735,7 @@
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         /* Cancel the posting of a new forum topic */
</span><del>-        jq('input#submit_topic_cancel').click( function() {
</del><ins>+        jq('#submit_topic_cancel').click( function() {
</ins><span class="cx">                 if ( !jq('#new-topic-post').length )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><span class="lines">@@ -750,7 +752,7 @@
</span><span class="cx">         /** Invite Friends Interface ****************************************/
</span><span class="cx">
</span><span class="cx">         /* Select a user from the list of friends and add them to the invite list */
</span><del>-        jq("div#invite-list input").click( function() {
</del><ins>+        jq("#invite-list input").click( function() {
</ins><span class="cx">                 jq('.ajax-loader').toggle();
</span><span class="cx">
</span><span class="cx">                 var friend_id = jq(this).val();
</span><span class="lines">@@ -766,9 +768,9 @@
</span><span class="cx">                         action: 'groups_invite_user',
</span><span class="cx">                         'friend_action': friend_action,
</span><span class="cx">                         'cookie': encodeURIComponent(document.cookie),
</span><del>-                        '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
</del><ins>+                        '_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
</ins><span class="cx">                         'friend_id': friend_id,
</span><del>-                        'group_id': jq("input#group_id").val()
</del><ins>+                        'group_id': jq("#group_id").val()
</ins><span class="cx">                 },
</span><span class="cx">                 function(response)
</span><span class="cx">                 {
</span><span class="lines">@@ -799,15 +801,15 @@
</span><span class="cx">                         action: 'groups_invite_user',
</span><span class="cx">                         'friend_action': 'uninvite',
</span><span class="cx">                         'cookie': encodeURIComponent(document.cookie),
</span><del>-                        '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
</del><ins>+                        '_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
</ins><span class="cx">                         'friend_id': friend_id,
</span><del>-                        'group_id': jq("input#group_id").val()
</del><ins>+                        'group_id': jq("#group_id").val()
</ins><span class="cx">                 },
</span><span class="cx">                 function(response)
</span><span class="cx">                 {
</span><span class="cx">                         jq('.ajax-loader').toggle();
</span><del>-                        jq('#friend-list li#uid-' + friend_id).remove();
-                        jq('#invite-list input#f-' + friend_id).prop('checked', false);
</del><ins>+                        jq('#friend-list #uid-' + friend_id).remove();
+                        jq('#invite-list #f-' + friend_id).prop('checked', false);
</ins><span class="cx">                 });
</span><span class="cx">
</span><span class="cx">                 return false;
</span><span class="lines">@@ -839,9 +841,9 @@
</span><span class="cx">         /** Friendship Requests **************************************/
</span><span class="cx">
</span><span class="cx">         /* Accept and Reject friendship request buttons */
</span><del>-        jq("ul#friend-list a.accept, ul#friend-list a.reject").click( function() {
</del><ins>+        jq("#friend-list a.accept, #friend-list a.reject").click( function() {
</ins><span class="cx">                 var button = jq(this);
</span><del>-                var li = jq(this).parents('ul#friend-list li');
</del><ins>+                var li = jq(this).parents('#friend-list li');
</ins><span class="cx">                 var action_div = jq(this).parents('li div.action');
</span><span class="cx">
</span><span class="cx">                 var id = li.attr('id').substr( 11, li.attr('id').length );
</span><span class="lines">@@ -874,7 +876,7 @@
</span><span class="cx">
</span><span class="cx">                         if ( response[0] + response[1] == '-1' ) {
</span><span class="cx">                                 li.prepend( response.substr( 2, response.length ) );
</span><del>-                                li.children('div#message').hide().fadeIn(200);
</del><ins>+                                li.children('#message').hide().fadeIn(200);
</ins><span class="cx">                         } else {
</span><span class="cx">                                 button.fadeOut( 100, function() {
</span><span class="cx">                                         if ( jq(this).hasClass('accept') ) {
</span><span class="lines">@@ -1005,34 +1007,34 @@
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         /* AJAX send reply functionality */
</span><del>-        jq("input#send_reply_button").click(
</del><ins>+        jq("#send_reply_button").click(
</ins><span class="cx">                 function() {
</span><span class="cx">                         var order = jq('#messages_order').val() || 'ASC',
</span><span class="cx">                         offset = jq('#message-recipients').offset();
</span><span class="cx">
</span><del>-                        var button = jq("input#send_reply_button");
</del><ins>+                        var button = jq("#send_reply_button");
</ins><span class="cx">                         jq(button).addClass('loading');
</span><span class="cx">
</span><span class="cx">                         jq.post( ajaxurl, {
</span><span class="cx">                                 action: 'messages_send_reply',
</span><span class="cx">                                 'cookie': encodeURIComponent(document.cookie),
</span><del>-                                '_wpnonce': jq("input#send_message_nonce").val(),
</del><ins>+                                '_wpnonce': jq("#send_message_nonce").val(),
</ins><span class="cx">
</span><span class="cx">                                 'content': jq("#message_content").val(),
</span><del>-                                'send_to': jq("input#send_to").val(),
-                                'subject': jq("input#subject").val(),
-                                'thread_id': jq("input#thread_id").val()
</del><ins>+                                'send_to': jq("#send_to").val(),
+                                'subject': jq("#subject").val(),
+                                'thread_id': jq("#thread_id").val()
</ins><span class="cx">                         },
</span><span class="cx">                         function(response)
</span><span class="cx">                         {
</span><span class="cx">                                 if ( response[0] + response[1] == "-1" ) {
</span><del>-                                        jq('form#send-reply').prepend( response.substr( 2, response.length ) );
</del><ins>+                                        jq('#send-reply').prepend( response.substr( 2, response.length ) );
</ins><span class="cx">                                 } else {
</span><del>-                                        jq('form#send-reply div#message').remove();
</del><ins>+                                        jq('#send-reply #message').remove();
</ins><span class="cx">                                         jq("#message_content").val('');
</span><span class="cx">
</span><span class="cx">                                         if ( 'ASC' == order ) {
</span><del>-                                                jq('form#send-reply').before( response );
</del><ins>+                                                jq('#send-reply').before( response );
</ins><span class="cx">                                         } else {
</span><span class="cx">                                                 jq('#message-recipients').after( response );
</span><span class="cx">                                                 jq(window).scrollTop(offset.top);
</span><span class="lines">@@ -1050,7 +1052,7 @@
</span><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         /* Marking private messages as read and unread */
</span><del>-        jq("a#mark_as_read, a#mark_as_unread").click(function() {
</del><ins>+        jq("#mark_as_read, #mark_as_unread").click(function() {
</ins><span class="cx">                 var checkboxes_tosend = '';
</span><span class="cx">                 var checkboxes = jq("#message-threads tr td input[type='checkbox']");
</span><span class="cx">
</span><span class="lines">@@ -1072,18 +1074,18 @@
</span><span class="cx">
</span><span class="cx">                 checkboxes.each( function(i) {
</span><span class="cx">                         if(jq(this).is(':checked')) {
</span><del>-                                if ( jq('tr#m-' + jq(this).attr('value')).hasClass(currentClass) ) {
</del><ins>+                                if ( jq('#m-' + jq(this).attr('value')).hasClass(currentClass) ) {
</ins><span class="cx">                                         checkboxes_tosend += jq(this).attr('value');
</span><del>-                                        jq('tr#m-' + jq(this).attr('value')).removeClass(currentClass);
-                                        jq('tr#m-' + jq(this).attr('value')).addClass(newClass);
-                                        var thread_count = jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').html();
</del><ins>+                                        jq('#m-' + jq(this).attr('value')).removeClass(currentClass);
+                                        jq('#m-' + jq(this).attr('value')).addClass(newClass);
+                                        var thread_count = jq('#m-' + jq(this).attr('value') + ' td span.unread-count').html();
</ins><span class="cx">
</span><del>-                                        jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').html(unreadCount);
-                                        jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
</del><ins>+                                        jq('#m-' + jq(this).attr('value') + ' td span.unread-count').html(unreadCount);
+                                        jq('#m-' + jq(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
</ins><span class="cx">
</span><span class="cx">                                         var inboxcount = jq('tr.unread').length;
</span><span class="cx">
</span><del>-                                        jq('a#user-messages span').html( inboxcount );
</del><ins>+                                        jq('#user-messages span').html( inboxcount );
</ins><span class="cx">
</span><span class="cx">                                         if ( i != checkboxes.length - 1 ) {
</span><span class="cx">                                                 checkboxes_tosend += ','
</span><span class="lines">@@ -1099,9 +1101,9 @@
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         /* Selecting unread and read messages in inbox */
</span><del>-        jq("select#message-type-select").change(
</del><ins>+        jq("#message-type-select").change(
</ins><span class="cx">                 function() {
</span><del>-                        var selection = jq("select#message-type-select").val();
</del><ins>+                        var selection = jq("#message-type-select").val();
</ins><span class="cx">                         var checkboxes = jq("td input[type='checkbox']");
</span><span class="cx">                         checkboxes.each( function(i) {
</span><span class="cx">                                 checkboxes[i].checked = "";
</span><span class="lines">@@ -1128,11 +1130,11 @@
</span><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         /* Bulk delete messages */
</span><del>-        jq("a#delete_inbox_messages, a#delete_sentbox_messages").click( function() {
</del><ins>+        jq("#delete_inbox_messages, #delete_sentbox_messages").click( function() {
</ins><span class="cx">                 checkboxes_tosend = '';
</span><span class="cx">                 checkboxes = jq("#message-threads tr td input[type='checkbox']");
</span><span class="cx">
</span><del>-                jq('div#message').remove();
</del><ins>+                jq('#message').remove();
</ins><span class="cx">                 jq(this).addClass('loading');
</span><span class="cx">
</span><span class="cx">                 jq(checkboxes).each( function(i) {
</span><span class="lines">@@ -1160,27 +1162,27 @@
</span><span class="cx">                                 });
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        jq('div#message').hide().slideDown(150);
-                        jq("a#delete_inbox_messages, a#delete_sentbox_messages").removeClass('loading');
</del><ins>+                        jq('#message').hide().slideDown(150);
+                        jq("#delete_inbox_messages, #delete_sentbox_messages").removeClass('loading');
</ins><span class="cx">                 });
</span><span class="cx">                 return false;
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         /* Close site wide notices in the sidebar */
</span><del>-        jq("a#close-notice").click( function() {
</del><ins>+        jq("#close-notice").click( function() {
</ins><span class="cx">                 jq(this).addClass('loading');
</span><del>-                jq('div#sidebar div.error').remove();
</del><ins>+                jq('#sidebar div.error').remove();
</ins><span class="cx">
</span><span class="cx">                 jq.post( ajaxurl, {
</span><span class="cx">                         action: 'messages_close_notice',
</span><span class="cx">                         'notice_id': jq('.notice').attr('rel').substr( 2, jq('.notice').attr('rel').length )
</span><span class="cx">                 },
</span><span class="cx">                 function(response) {
</span><del>-                        jq("a#close-notice").removeClass('loading');
</del><ins>+                        jq("#close-notice").removeClass('loading');
</ins><span class="cx">
</span><span class="cx">                         if ( response[0] + response[1] == '-1' ) {
</span><span class="cx">                                 jq('.notice').prepend( response.substr( 2, response.length ) );
</span><del>-                                jq( 'div#sidebar div.error').hide().fadeIn( 200 );
</del><ins>+                                jq( '#sidebar div.error').hide().fadeIn( 200 );
</ins><span class="cx">                         } else {
</span><span class="cx">                                 jq('.notice').slideUp( 100 );
</span><span class="cx">                         }
</span><span class="lines">@@ -1239,21 +1241,21 @@
</span><span class="cx">                 jq('.activity-type-tabs li').each( function() {
</span><span class="cx">                         jq(this).removeClass('selected');
</span><span class="cx">                 });
</span><del>-                jq('li#activity-' + jq.cookie('bp-activity-scope') + ', .item-list-tabs li.current').addClass('selected');
</del><ins>+                jq('#activity-' + jq.cookie('bp-activity-scope') + ', .item-list-tabs li.current').addClass('selected');
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* Setup object scope and filter based on the current cookie settings for the object. */
</span><span class="cx"> function bp_init_objects(objects) {
</span><span class="cx">         jq(objects).each( function(i) {
</span><del>-                if ( null != jq.cookie('bp-' + objects[i] + '-filter') && jq('li#' + objects[i] + '-order-select select').length )
-                        jq('li#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').prop( 'selected', true );
</del><ins>+                if ( null != jq.cookie('bp-' + objects[i] + '-filter') && jq('#' + objects[i] + '-order-select select').length )
+                        jq('#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').prop( 'selected', true );
</ins><span class="cx">
</span><span class="cx">                 if ( null != jq.cookie('bp-' + objects[i] + '-scope') && jq('div.' + objects[i]).length ) {
</span><span class="cx">                         jq('.item-list-tabs li').each( function() {
</span><span class="cx">                                 jq(this).removeClass('selected');
</span><span class="cx">                         });
</span><del>-                        jq('.item-list-tabs li#' + objects[i] + '-' + jq.cookie('bp-' + objects[i] + '-scope') + ', div.item-list-tabs#object-nav li.current').addClass('selected');
</del><ins>+                        jq('#' + objects[i] + '-' + jq.cookie('bp-' + objects[i] + '-scope') + ', #object-nav li.current').addClass('selected');
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx"> }
</span><span class="lines">@@ -1284,7 +1286,7 @@
</span><span class="cx">         jq('.item-list-tabs li').each( function() {
</span><span class="cx">                 jq(this).removeClass('selected');
</span><span class="cx">         });
</span><del>-        jq('.item-list-tabs li#' + object + '-' + scope + ', .item-list-tabs#object-nav li.current').addClass('selected');
</del><ins>+        jq('#' + object + '-' + scope + ', #object-nav li.current').addClass('selected');
</ins><span class="cx">         jq('.item-list-tabs li.selected').addClass('loading');
</span><span class="cx">         jq('.item-list-tabs select option[value="' + filter + '"]').prop( 'selected', true );
</span><span class="cx">
</span><span class="lines">@@ -1332,7 +1334,7 @@
</span><span class="cx">                 jq(this).removeClass('selected loading');
</span><span class="cx">         });
</span><span class="cx">         /* Set the correct selected nav and filter */
</span><del>-        jq('li#activity-' + scope + ', .item-list-tabs li.current').addClass('selected');
</del><ins>+        jq('#activity-' + scope + ', .item-list-tabs li.current').addClass('selected');
</ins><span class="cx">         jq('#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected').addClass('loading');
</span><span class="cx">         jq('#activity-filter-select select option[value="' + filter + '"]').prop( 'selected', true );
</span><span class="cx">
</span><span class="lines">@@ -1345,7 +1347,7 @@
</span><span class="cx">         bp_ajax_request = jq.post( ajaxurl, {
</span><span class="cx">                 action: 'activity_widget_filter',
</span><span class="cx">                 'cookie': encodeURIComponent(document.cookie),
</span><del>-                '_wpnonce_activity_filter': jq("input#_wpnonce_activity_filter").val(),
</del><ins>+                '_wpnonce_activity_filter': jq("#_wpnonce_activity_filter").val(),
</ins><span class="cx">                 'scope': scope,
</span><span class="cx">                 'filter': filter
</span><span class="cx">         },
</span><span class="lines">@@ -1381,12 +1383,12 @@
</span><span class="cx">                 if ( jq(this).children('ul').children('li').length < 5 ) return;
</span><span class="cx">
</span><span class="cx">                 var comments_div = jq(this);
</span><del>-                var parent_li = comments_div.parents('ul#activity-stream > li');
</del><ins>+                var parent_li = comments_div.parents('#activity-stream > li');
</ins><span class="cx">                 var comment_lis = jq(this).children('ul').children('li');
</span><span class="cx">                 var comment_count = ' ';
</span><span class="cx">
</span><del>-                if ( jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').length )
-                        var comment_count = jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html();
</del><ins>+                if ( jq('#' + parent_li.attr('id') + ' a.acomment-reply span').length )
+                        var comment_count = jq('#' + parent_li.attr('id') + ' a.acomment-reply span').html();
</ins><span class="cx">
</span><span class="cx">                 comment_lis.each( function(i) {
</span><span class="cx">                         /* Show the latest 5 root comments */
</span></span></pre>
</div>
</div>
</body>
</html>