From 1945e6322e640016e4652158d29771111128b71e Mon Sep 17 00:00:00 2001 From: itantik Date: Tue, 30 Dec 2014 21:44:26 +0100 Subject: [PATCH 1/2] Added missing argument to the buildMemberNav() Four arguments are passed to the buildMemberNav(), but only three ones were defined. --- templates/default/publish.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/default/publish.js b/templates/default/publish.js index 406e7cfb..c94d5be6 100644 --- a/templates/default/publish.js +++ b/templates/default/publish.js @@ -288,7 +288,7 @@ function attachModuleSymbols(doclets, modules) { }); } -function buildMemberNav(items, itemHeading, itemsSeen) { +function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) { var nav = ''; if (items.length) { @@ -296,7 +296,7 @@ function buildMemberNav(items, itemHeading, itemsSeen) { items.forEach(function(item) { if ( !hasOwnProp.call(itemsSeen, item.longname) ) { - itemsNav += '
  • ' + linkto(item.longname, item.name.replace(/^module:/, '')) + '
  • '; + itemsNav += '
  • ' + linktoFn(item.longname, item.name.replace(/^module:/, '')) + '
  • '; itemsSeen[item.longname] = true; } }); From d57c67d9afb11e3049c61a0ab0556d52eaa48a70 Mon Sep 17 00:00:00 2001 From: itantik Date: Tue, 30 Dec 2014 22:08:41 +0100 Subject: [PATCH 2/2] 'longname' property of tutorials is undefined therefore uniqueness checking causes the navigation displays only one tutorial. Items without 'longname' should be omitted from checking. --- templates/default/publish.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/default/publish.js b/templates/default/publish.js index c94d5be6..1c49130b 100644 --- a/templates/default/publish.js +++ b/templates/default/publish.js @@ -295,7 +295,10 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) { var itemsNav = ''; items.forEach(function(item) { - if ( !hasOwnProp.call(itemsSeen, item.longname) ) { + if ( !hasOwnProp.call(item, 'longname') ) { + itemsNav += '
  • ' + linktoFn('', item.name) + '
  • '; + } + else if ( !hasOwnProp.call(itemsSeen, item.longname) ) { itemsNav += '
  • ' + linktoFn(item.longname, item.name.replace(/^module:/, '')) + '
  • '; itemsSeen[item.longname] = true; }