partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit a49c6fc8c9bf2dd97d9498abccd534b0dfa566bf
parent 2da8cee9da38407d6106b669b4d53459e2beef44
Author: Felicitus <felicitus@felicitus.org>
Date:   Wed,  4 Jul 2012 15:39:19 +0200

Only show category descriptions if they are really there

Diffstat:
Msrc/frontend/js/Components/CategoryTree.js | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/frontend/js/Components/CategoryTree.js b/src/frontend/js/Components/CategoryTree.js @@ -65,7 +65,10 @@ Ext.define("PartKeepr.CategoryTree", { }, buildCategoryTree : function(root, data, expandedNodes) { var label; - if ((data.id > 1) && (PartKeepr.getApplication().getUserPreference("partkeepr.categorytree.showdescriptions") === true)) { + if (data.id > 1 && + data.description && + PartKeepr.getApplication().getUserPreference("partkeepr.categorytree.showdescriptions") === true) + { label = data.name + " - " + data.description; } else { label = data.name;