Skip to:
Content

BuddyPress.org

Changeset 6928


Ignore:
Timestamp:
04/19/2013 08:59:35 PM (12 years ago)
Author:
boonebgorges
Message:

Improve JS for removing items from message recipient autocomplete list

This changeset introduces a more reliable method for removing usernames from
the list of message recipients, which works properly with usernames that
contain hyphens.

Fixes #4779

Props mort3n

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/js/autocomplete/jquery.autocompletefb.js

    r6264 r6928  
    3939        },
    4040        removeUsername: function(o){
    41             var newID = o.parentNode.id.split('-');
    42             jQuery('#send-to-usernames').removeClass(newID[1]);
     41            var newID = o.parentNode.id.substr( o.parentNode.id.indexOf('-')+1 );
     42            jQuery('#send-to-usernames').removeClass(newID);
    4343        }
    4444    }
Note: See TracChangeset for help on using the changeset viewer.