From aad238b0bb1878d9c644457cac18c91174c7abb7 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo <nene@triin.net> Date: Thu, 29 Sep 2011 17:40:20 +0300 Subject: [PATCH] Treat all package names equally when rendering tree. This is a switch away from ext-doc style tree-logic where the tree could look like this: - Foo - Bar - Bar.Baz - Bar.Zap Now the tree always looks like this: - Foo - Bar - Baz - Zap This change is mostly in response to request of a user working with a system where most package names were also classes. With previous PackageLogic implementation he ended up with a pretty flat tree. --- template/app/view/cls/PackageLogic.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/template/app/view/cls/PackageLogic.js b/template/app/view/cls/PackageLogic.js index cb6f218a..23398b27 100644 --- a/template/app/view/cls/PackageLogic.js +++ b/template/app/view/cls/PackageLogic.js @@ -108,16 +108,9 @@ Ext.define('Docs.view.cls.PackageLogic', { // Utility method that given full package or class name extracts // the "class"-part of the name. - // - // Because we try to emulate ext-doc, it's not as simple as just - // taking the last part. shortName: function(name) { var parts = name.split(/\./); - var srt = parts.pop(); - while (parts.length > 1 && /^[A-Z]/.test(parts[parts.length-1])) { - srt = parts.pop() + "." + srt; - } - return srt; + return parts.pop(); } }); -- GitLab