From 0f767ca227295d2a125eaa6815c2a393b067c168 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 8 Apr 2013 12:18:10 -0400 Subject: [PATCH] Trim category description at 200 chars in category combobox --- .../javascripts/discourse/views/combobox_view_category.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/views/combobox_view_category.js b/app/assets/javascripts/discourse/views/combobox_view_category.js index 3fbb6ad051b..a4e95da7307 100644 --- a/app/assets/javascripts/discourse/views/combobox_view_category.js +++ b/app/assets/javascripts/discourse/views/combobox_view_category.js @@ -19,7 +19,7 @@ Discourse.ComboboxViewCategory = Discourse.ComboboxView.extend({ templateData.text_color + ";'>" + templateData.name + ""; result += " × " + templateData.topic_count + ""; if (templateData.description && templateData.description !== 'null') { - result += '
' + Handlebars.Utils.escapeExpression(templateData.description) + '
'; + result += '
' + Handlebars.Utils.escapeExpression(templateData.description.substr(0,200)) + (templateData.description.length > 200 ? '…' : '') + '
'; } return result; }