Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
Line 188: Line 188:
td.weekday a:visited, td.sunday a:visited, td.saturday a:visited, td.selectedDate a:visited {
td.weekday a:visited, td.sunday a:visited, td.saturday a:visited, td.selectedDate a:visited {
   color: #2b6196;
   color: #2b6196;
 +
}
 +
 +
.noEntries {
 +
  color: #666;
}
}
Line 416: Line 420:
function GenCell(pValue, css_class)//Generate table cell with value
function GenCell(pValue, css_class)//Generate table cell with value
{
{
-
return "<td class='" + css_class + "'><a href='#"  + pValue +"-" + Cal.GetMonthName() + "'>"+pValue +"</a></td>";
+
    var hash = pValue +"-" + Cal.GetMonthName();
 +
if (document.getElementById(hash) {
 +
return "<td class='" + css_class + "'>" <a href='#"  + hash + "'>"+pValue +"</a></td>";
 +
} else {
 +
return "<td class='" + css_class + " noEntries'>" + pValue +"</td>";
 +
}
}
}

Revision as of 19:08, 29 September 2013