mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Trim category description at 200 chars in category combobox
This commit is contained in:
parent
4ad006ea97
commit
0f767ca227
@ -19,7 +19,7 @@ Discourse.ComboboxViewCategory = Discourse.ComboboxView.extend({
|
|||||||
templateData.text_color + ";'>" + templateData.name + "</span>";
|
templateData.text_color + ";'>" + templateData.name + "</span>";
|
||||||
result += " <span class='topic-count'>× " + templateData.topic_count + "</span>";
|
result += " <span class='topic-count'>× " + templateData.topic_count + "</span>";
|
||||||
if (templateData.description && templateData.description !== 'null') {
|
if (templateData.description && templateData.description !== 'null') {
|
||||||
result += '<div class="category-desc">' + Handlebars.Utils.escapeExpression(templateData.description) + '</div>';
|
result += '<div class="category-desc">' + Handlebars.Utils.escapeExpression(templateData.description.substr(0,200)) + (templateData.description.length > 200 ? '…' : '') + '</div>';
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user