@@ -3654,41 +3654,50 @@ def generateAPIRootBody(self):
36543654 */
36553655 // Part 1: use linkColor as a parameter to bootstrap treeview
36563656
3657- // apply the page view hierarchy
3658- $("#{page_idx}").treeview({{
3659- data: {page_func_name}(),
3660- enableLinks: true,
3661- color: linkColor,
3662- showTags: {show_tags},
3663- collapseIcon: "{collapse_icon}",
3664- expandIcon: "{expand_icon}",
3665- levels: {levels},
3666- onhoverColor: "{onhover_color}"
3667- }});
3668-
3669- // apply the class view hierarchy
3670- $("#{class_idx}").treeview({{
3671- data: {class_func_name}(),
3672- enableLinks: true,
3673- color: linkColor,
3674- showTags: {show_tags},
3675- collapseIcon: "{collapse_icon}",
3676- expandIcon: "{expand_icon}",
3677- levels: {levels},
3678- onhoverColor: "{onhover_color}"
3679- }});
3680-
3681- // apply the file view hierarchy
3682- $("#{file_idx}").treeview({{
3683- data: {file_func_name}(),
3684- enableLinks: true,
3685- color: linkColor,
3686- showTags: {show_tags},
3687- collapseIcon: "{collapse_icon}",
3688- expandIcon: "{expand_icon}",
3689- levels: {levels},
3690- onhoverColor: "{onhover_color}"
3691- }});
3657+ // apply the page view hierarchy if it exists
3658+ var page_h = $("#{page_idx}");
3659+ if (page_h.length) {{
3660+ page_h.treeview({{
3661+ data: {page_func_name}(),
3662+ enableLinks: true,
3663+ color: linkColor,
3664+ showTags: {show_tags},
3665+ collapseIcon: "{collapse_icon}",
3666+ expandIcon: "{expand_icon}",
3667+ levels: {levels},
3668+ onhoverColor: "{onhover_color}"
3669+ }});
3670+ }}
3671+
3672+ // apply the class view hierarchy if it exists
3673+ var class_h = $("#{class_idx}");
3674+ if (class_h.length) {{
3675+ class_h.treeview({{
3676+ data: {class_func_name}(),
3677+ enableLinks: true,
3678+ color: linkColor,
3679+ showTags: {show_tags},
3680+ collapseIcon: "{collapse_icon}",
3681+ expandIcon: "{expand_icon}",
3682+ levels: {levels},
3683+ onhoverColor: "{onhover_color}"
3684+ }});
3685+ }}
3686+
3687+ // apply the file view hierarchy if it exists
3688+ var file_h = $("#{file_idx}");
3689+ if (file_h.length) {{
3690+ file_h.treeview({{
3691+ data: {file_func_name}(),
3692+ enableLinks: true,
3693+ color: linkColor,
3694+ showTags: {show_tags},
3695+ collapseIcon: "{collapse_icon}",
3696+ expandIcon: "{expand_icon}",
3697+ levels: {levels},
3698+ onhoverColor: "{onhover_color}"
3699+ }});
3700+ }}
36923701
36933702 // Part 2: override the style of the glyphicons by injecting some CSS
36943703 $('<style type="text/css" id="exhaleTreeviewOverride">' +
0 commit comments