Team:TU Delft/scroll calendar
From 2010.igem.org
(Difference between revisions)
Line 88: | Line 88: | ||
} | } | ||
- | function | + | function setCalendarLinks(fnGetPath) { |
- | + | // process each day entry to change the link | |
+ | $("#calview .month").each(function() { | ||
+ | var month = $.trim( $(".heading", this).text() ); | ||
+ | |||
+ | $("a", this).each(function() { | ||
+ | var day = $.trim( $(this).text() ); | ||
+ | if ($(".day-active", this).length > 0) | ||
+ | this.href = fnGetPath(day, month, true); | ||
+ | else | ||
+ | this.href = fnGetPath(day, month, false); | ||
+ | }); | ||
+ | }); | ||
} | } | ||
+ | |||
$(function() { | $(function() { | ||
Line 103: | Line 115: | ||
}); | }); | ||
- | |||
- | + | setCalendarLinks (function(day, mo, hasEntry) { | |
- | + | ||
- | + | ||
- | + | console.log('Day: ' + day + ' Mo: ' + mo + ' ; hasentry=' + hasEntry); | |
- | + | return '/Team:TU_Delft#page=blogtest&blog=' + day + '_' + mo + '_content'; | |
- | + | ||
- | + | ||
- | console.log(day + | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
Revision as of 16:00, 15 September 2010
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|