|
|
|
@ -189,6 +189,10 @@ export function makeCollapsibleList( caption, vals, maxItems, style ) { |
|
|
|
|
excessItemsRef.style.display = show ? "block" : "none" ; |
|
|
|
|
flipButtonRef.src = flipButtonRef.src.substr( 0, pos ) + (show ? "/collapsible-up.png" : "/collapsible-down.png") ; |
|
|
|
|
} |
|
|
|
|
if ( excessItems.length === 0 ) |
|
|
|
|
caption = <span> {caption+":"} </span> ; |
|
|
|
|
else |
|
|
|
|
caption = <span> {caption} <span className="count"> ({vals.length}) </span> </span> ; |
|
|
|
|
return ( <div className="collapsible" style={style}> |
|
|
|
|
<div className="caption"> {caption} |
|
|
|
|
{ excessItems.length > 0 && <img src="images/collapsible-down.png" onClick={flipExcessItems} ref={r => flipButtonRef=r} alt="Show/hide extra items." /> } |
|
|
|
|