Team:NTU-Taida/Templates/Footer
From 2012.igem.org
(Difference between revisions)
m |
(change the code making abbr subnav) |
||
Line 39: | Line 39: | ||
var arrayAbbrText = displayText.split(' '); | var arrayAbbrText = displayText.split(' '); | ||
var newDisplayText=""; | var newDisplayText=""; | ||
+ | var nextDisplayText=""; | ||
var i = -1; | var i = -1; | ||
var state = false; | var state = false; | ||
do{ | do{ | ||
i++; | i++; | ||
- | newDisplayText = | + | newDisplayText = nextDisplayText; |
+ | nextDisplayText = nextDisplayText + ' ' + arrayAbbrText[i]; | ||
if (i < arrayAbbrText.length){ | if (i < arrayAbbrText.length){ | ||
- | if ( | + | if (nextDisplayText.length < 20){ |
state = true; | state = true; | ||
} | } | ||
Line 55: | Line 57: | ||
} | } | ||
}while (state) | }while (state) | ||
- | if (i == 0){ | + | /*if (i == 0){ |
return arrayAbbrText[0]; | return arrayAbbrText[0]; | ||
}else{ | }else{ | ||
Line 62: | Line 64: | ||
newDisplayText = newDisplayText + arrayAbbrText[j]; | newDisplayText = newDisplayText + arrayAbbrText[j]; | ||
} | } | ||
- | } | + | }*/ |
return newDisplayText + ' …'; | return newDisplayText + ' …'; | ||
}else{ | }else{ |
Revision as of 02:16, 25 September 2012