board -> boardID in Header.generateBoardList().

Conflicts:
	src/General/Header.coffee
This commit is contained in:
Mayhem 2014-02-08 18:07:11 +01:00 committed by ccd0
parent 9daf6dd05f
commit 84813bf470

View File

@ -186,18 +186,18 @@ Header =
textContent: (t.match(/-text:"(.+)"\,/) || [null, '+'])[1]
className: 'external'
return a
board = if /^current/.test t
boardID = if /^current/.test t
g.BOARD.ID
else
t.match(/^[^-]+/)[0]
for a in as
if a.textContent is board
if a.textContent is boardID
a = a.cloneNode true
a.textContent = if /-title/.test(t) or /-replace/.test(t) and $.hasClass a, 'current'
a.title
else if /-full/.test t
"/#{board}/ - #{a.title}"
"/#{boardID}/ - #{a.title}"
else if m = t.match /-text:"(.+)"/
m[1]
else
@ -205,13 +205,13 @@ Header =
if m = t.match /-(index|catalog)/
a.dataset.only = m[1]
a.href = CatalogLinks[m[1]] board
a.href = CatalogLinks[m[1]] boardID
$.addClass a, 'catalog' if m[1] is 'catalog'
if /-archive/.test(t) and href = Redirect.to 'board', {boardID: board}
if /-archive/.test(t) and href = Redirect.to 'board', {boardID}
a.href = href
$.addClass a, 'navSmall' if board is '@'
$.addClass a, 'navSmall' if boardID is '@'
return a
$.tn t
$.add list, nodes