mirror of https://github.com/zulip/zulip.git
Show an item for @all in the autocomplete list.
Trac #1509 (imported from commit 4bc5f088a354dea4ffaf98ac2d988d9d05b19d51)
This commit is contained in:
parent
191c6b6412
commit
79af591b41
|
@ -282,7 +282,15 @@ exports.initialize = function () {
|
||||||
} else {
|
} else {
|
||||||
this.completing = 'mention';
|
this.completing = 'mention';
|
||||||
this.token = current_token.substring(current_token.indexOf("@")+1);
|
this.token = current_token.substring(current_token.indexOf("@")+1);
|
||||||
return page_params.people_list;
|
var all_item = {
|
||||||
|
special_item_text: "all (Notify everyone)",
|
||||||
|
email: "all",
|
||||||
|
// Always sort above, under the assumption that names will
|
||||||
|
// be longer and only contain "all" as a substring.
|
||||||
|
pm_recipient_count: Infinity,
|
||||||
|
full_name: "all"
|
||||||
|
};
|
||||||
|
return page_params.people_list.concat([all_item]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
items: 5,
|
items: 5,
|
||||||
|
|
|
@ -75,6 +75,9 @@ exports.private_message_typeahead_list = [];
|
||||||
exports.private_message_mapped = {};
|
exports.private_message_mapped = {};
|
||||||
|
|
||||||
exports.render_person = function (person) {
|
exports.render_person = function (person) {
|
||||||
|
if (person.special_item_text){
|
||||||
|
return person.special_item_text;
|
||||||
|
}
|
||||||
return person.full_name + " <" + person.email + ">";
|
return person.full_name + " <" + person.email + ">";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue