Make custom 'current' board links work on unlisted boards.
This commit is contained in:
parent
f80eb87dc6
commit
9693ea5821
@ -207,14 +207,22 @@ Header =
|
|||||||
g.BOARD.ID
|
g.BOARD.ID
|
||||||
else
|
else
|
||||||
t.match(/^[^-]+/)[0]
|
t.match(/^[^-]+/)[0]
|
||||||
for a in as
|
|
||||||
if a.textContent is boardID
|
for aOrig in as
|
||||||
a = a.cloneNode true
|
if aOrig.textContent is boardID
|
||||||
|
a = aOrig.cloneNode true
|
||||||
|
if !a
|
||||||
|
if /^current/.test t
|
||||||
|
a = $.el 'a',
|
||||||
|
href: "/#{boardID}/"
|
||||||
|
textContent: boardID
|
||||||
|
else
|
||||||
|
return $.tn t
|
||||||
|
|
||||||
a.textContent = if /-title/.test(t) or /-replace/.test(t) and $.hasClass a, 'current'
|
a.textContent = if /-title/.test(t) or /-replace/.test(t) and $.hasClass a, 'current'
|
||||||
a.title
|
a.title or a.textContent
|
||||||
else if /-full/.test t
|
else if /-full/.test t
|
||||||
"/#{boardID}/ - #{a.title}"
|
"/#{boardID}/" + (if a.title then " - #{a.title}" else '')
|
||||||
else if text
|
else if text
|
||||||
text
|
text
|
||||||
else
|
else
|
||||||
@ -239,7 +247,7 @@ Header =
|
|||||||
|
|
||||||
$.addClass a, 'navSmall' if boardID is '@'
|
$.addClass a, 'navSmall' if boardID is '@'
|
||||||
return a
|
return a
|
||||||
$.tn t
|
|
||||||
$.add list, nodes
|
$.add list, nodes
|
||||||
$.ready CatalogLinks.initBoardList
|
$.ready CatalogLinks.initBoardList
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user