davidshimjs / jaguarjs-jsdoc

A Template of jsdoc for jaguar.js project
MIT License
218 stars 136 forks source link

Cannot open static class in navigation bar #22

Open sttk opened 10 years ago

sttk commented 10 years ago

A navigation bar menu of static class (tagged @class and @static) don't expand. This cause is a mismatch between the class name (ex. aaa.bbb.ccc#Ddd) and the file name (ex. aaa.bbb.ccc_Ddd) of the static class in main.js. Modify following part of main.js (line 32-36):

// Show an item related a current documentation automatically
var filename = $('.page-title').data('filename').replace(/\.[a-z]+$/, '');
var $currentItem = $('.navigation .item[data-name*="' + filename + '"]:eq(0)');

if ($currentItem.length) {
...

to:

// Show an item related a current documentation automatically
var filename = $('.page-title').data('filename').replace(/\.[a-z]+$/, '');
var $linkItem = $('.navigation .item .title a[href="'+filename+'.html"]:eq(0)');
if ($linkItem.length) {
    $currentItem = $linkItem.parent().parent();
...