mirror of https://github.com/zulip/zulip.git
Highlight search typeaheads for streams
(imported from commit e8725fe8c4f4985d46e48fdab5003e3e9def9bd1)
This commit is contained in:
parent
667a47755e
commit
96100bb42a
|
@ -220,6 +220,7 @@ exports.initialize = function () {
|
|||
var prefix;
|
||||
var person;
|
||||
var name;
|
||||
var stream;
|
||||
|
||||
if (obj.action === 'private_message') {
|
||||
prefix = 'Narrow to private messages with';
|
||||
|
@ -235,6 +236,13 @@ exports.initialize = function () {
|
|||
return prefix + ' ' + name;
|
||||
}
|
||||
|
||||
if (obj.action === 'stream') {
|
||||
prefix = 'Narrow to stream';
|
||||
stream = obj.query;
|
||||
stream = typeahead_helper.highlight_query_in_phrase(query, stream);
|
||||
return prefix + ' ' + stream;
|
||||
}
|
||||
|
||||
var parts = render_object_in_parts(obj);
|
||||
parts.query = Handlebars.Utils.escapeExpression(parts.query);
|
||||
return parts.prefix + " " + parts.query + " " + parts.suffix;
|
||||
|
|
Loading…
Reference in New Issue