mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Contacts: Make looking up group name less hackish
This commit is contained in:
parent
d5cf911715
commit
f475b5ef85
@ -80,12 +80,14 @@ OC.Contacts = OC.Contacts || {};
|
||||
/**
|
||||
* Get the group name by id.
|
||||
*
|
||||
* Kind of a hack. Need to get the immidiate text without the enclosed spans with number etc.
|
||||
* Not sure this works in IE8 and maybe others.
|
||||
*
|
||||
* @param integer id. The numeric group or addressbook id.
|
||||
* @returns string The name of the group.
|
||||
* FIXME: Not sure this works in IE8 and maybe others.
|
||||
*/
|
||||
GroupList.prototype.nameById = function(id) {
|
||||
return this.findById(id).contents().filter(function(){ return(this.nodeType == 3); }).text().trim();
|
||||
return this.findById(id).clone().find("*").remove().end().text(); //.contents().filter(function(){ return(this.nodeType == 3); }).text().trim();
|
||||
};
|
||||
|
||||
/** Get the group element by id.
|
||||
|
Loading…
Reference in New Issue
Block a user