Difference between revisions of "Template:Waterloo/Pages/cal-heatmap-test"

 
(8 intermediate revisions by the same user not shown)
Line 25: Line 25:
 
<div>
 
<div>
 
<h1 id="onClick-placeholder"></h1>
 
<h1 id="onClick-placeholder"></h1>
<div id="notes-table"></div>
+
<ul id="notes-table"></ul>
 
</div>
 
</div>
 
<script type="text/javascript">
 
<script type="text/javascript">
Line 38: Line 38:
 
    cellSize: 32,
 
    cellSize: 32,
 
subDomainTextFormat: "%d",
 
subDomainTextFormat: "%d",
 +
displayLegend: false,
 
onClick: function(date, nb) {
 
onClick: function(date, nb) {
 
$("#onClick-placeholder").html("<b>" +
 
$("#onClick-placeholder").html("<b>" +
 
date.toDateString() + "</b>"
 
date.toDateString() + "</b>"
 
);
 
);
$("#notes-table").html("<b>" +
+
var message = ""
notes[month[date.getMonth()]+(date.getDate())] + "</b>"
+
var key = month[date.getMonth()]+(date.getDate())
 +
if (key in notes){
 +
$.each(notes[key], function( index, value ) {
 +
message += "<li>"+value+"</li>";
 +
});}
 +
$("#notes-table").html(message
 
);
 
);
 
}
 
}

Latest revision as of 23:53, 13 September 2015