mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
typeahead: Show header text for some mentions.
Show help text when completing stream, topic, mention and silent_mention.
This commit is contained in:
parent
6c34d99ad0
commit
bb46bc099b
@ -754,6 +754,19 @@ exports.compose_trigger_selection = function (event) {
|
||||
return false;
|
||||
};
|
||||
|
||||
function get_header_text() {
|
||||
var tip_text = '';
|
||||
switch (this.completing) {
|
||||
case 'stream':
|
||||
case 'topic_list':
|
||||
tip_text = i18n.t('Press > to mention a topic');
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return '<em>' + tip_text + '</em>';
|
||||
}
|
||||
|
||||
exports.initialize_compose_typeahead = function (selector) {
|
||||
var completions = {
|
||||
mention: true,
|
||||
@ -778,6 +791,7 @@ exports.initialize_compose_typeahead = function (selector) {
|
||||
completions: completions,
|
||||
automated: exports.compose_automated_selection,
|
||||
trigger_selection: exports.compose_trigger_selection,
|
||||
header: get_header_text,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user