Add rulers to holidays

This commit is contained in:
Gergely Polonkai 2015-11-23 11:57:40 +01:00
parent d56036f36d
commit cf440ec976
3 changed files with 25 additions and 0 deletions

View File

@ -71,3 +71,8 @@ td {
.date-popover { .date-popover {
text-align: center; text-align: center;
} }
.holiday .small {
font-size: 75%;
font-weight: normal;
}

View File

@ -114,6 +114,10 @@
$('div.month').each(function() { $('div.month').each(function() {
genMonthTable(this); genMonthTable(this);
}); });
$('div .holiday').each(function() {
updateHoliday(this);
});
</script> </script>
</body> </body>
</html> </html>

View File

@ -542,3 +542,19 @@ function getMoonPhase(date) {
return phase; return phase;
} }
function updateHoliday(div) {
id = $(div).attr('id');
holiday_name = $(div).html();
ruler = entities[holiday_name].entity;
element = entities[holiday_name].element;
if (element != undefined) {
ruler += ', ' + element;
}
ruler = $('<p>').addClass('small').html(ruler);
$(div).append(ruler);
}