mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
Simplify subs member list rendering
(imported from commit 8772bc09341a89245c6013dcf106ce52c81abe7a)
This commit is contained in:
@@ -217,17 +217,11 @@ function add_sub_to_table(sub) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function format_member_list_elem(name, email) {
|
function format_member_list_elem(name, email) {
|
||||||
return name + ' <' + email + '>';
|
return name + (email ? ' <' + email + '>' : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_to_member_list(ul, name, email) {
|
function add_to_member_list(ul, name, email) {
|
||||||
var member;
|
$('<li>').prependTo(ul).text(format_member_list_elem(name, email));
|
||||||
if (email === undefined) {
|
|
||||||
member = name;
|
|
||||||
} else {
|
|
||||||
member = format_member_list_elem(name, email);
|
|
||||||
}
|
|
||||||
$('<li>').prependTo(ul).text(member);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mark_subscribed(stream_name, attrs) {
|
function mark_subscribed(stream_name, attrs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user