Skip to:
Content

BuddyPress.org

Ticket #3194: 3194-2.patch

File 3194-2.patch, 3.1 KB (added by Dennissmolek, 15 years ago)

Ok, way more in depth version. Creates a visit user link when accepted, and just grays out the rejected bar. The button isnt working directly for some reason, but will in a new tab. Ideas?

  • bp-default/_inc/css/default.css

     
    814814ul.button-nav li.current a {
    815815        font-weight: bold;
    816816}
     817a.rejected, a.rejected:hover {
     818color: #888888;
     819}
     820a.accepted {
     821}
    817822
    818 
    819823/* > AJAX Loaders
    820824-------------------------------------------------------------- */
    821825
  • bp-default/_inc/global.js

     
    744744                                button.fadeOut( 100, function() {
    745745                                        if ( jq(this).hasClass('accept') ) {
    746746                                                action_div.children('a.reject').hide();
    747                                                 jq(this).html( BP_DTheme.accepted ).fadeIn(50);
     747                                                jq(this).html( BP_DTheme.friend_accepted ).fadeIn(50);
    748748                                                jq(this).addClass('accepted');
     749                                                /*Locate User's Profile URL and set this new link to it.  This is dependant on using the default theme as of 1.3*/
     750                                                var friend_url = jq(this).parents('ul#friend-list li').find('a.member_link').attr('href');
     751                                                jq(this).attr('href',friend_url );
    749752                                        } else {
    750753                                                action_div.children('a.accept').hide();
    751754                                                jq(this).html( BP_DTheme.rejected ).fadeIn(50);
    752755                                                jq(this).addClass('rejected');
     756                                                jq(this).removeClass('button');
     757                                                jq(this).css({'text-decoration':'none','cursor':'default'});
    753758                                        }
    754759                                });
    755760                        }
  • bp-default/functions.php

     
    144144        // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    145145        $params = array(
    146146                'my_favs'           => __( 'My Favorites', 'buddypress' ),
     147                'friend_accepted'          => __( 'Visit User', 'buddypress' ),
    147148                'accepted'          => __( 'Accepted', 'buddypress' ),
    148149                'rejected'          => __( 'Rejected', 'buddypress' ),
    149150                'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
  • bp-default/members/single/friends/requests.php

     
    2121        <ul id="friend-list" class="item-list" role="main">
    2222                <?php while ( bp_members() ) : bp_the_member(); ?>
    2323
    24                         <li id="friendship-<?php bp_friend_friendship_id() ?>">
     24                        <li id="friendship-<?php bp_friend_friendship_id() ?>" class="friendship_list_item">
    2525                                <div class="item-avatar">
    2626                                        <a href="<?php bp_member_link() ?>"><?php bp_member_avatar() ?></a>
    2727                                </div>
    2828
    2929                                <div class="item">
    30                                         <div class="item-title"><a href="<?php bp_member_link() ?>"><?php bp_member_name() ?></a></div>
     30                                        <div class="item-title"><a class="member_link" href="<?php bp_member_link() ?>"><?php bp_member_name() ?></a></div>
    3131                                        <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div>
    3232                                </div>
    3333