Team:TU Delft/scroll calendar
From 2010.igem.org
(Difference between revisions)
(64 intermediate revisions not shown) | |||
Line 3: | Line 3: | ||
<style> | <style> | ||
table th,td { border: none; } | table th,td { border: none; } | ||
- | #calview table.month { width: 180px; height: 180px; border-width: 0px; } | + | #calview table.month { |
+ | width: 180px; height: 180px; border-width: 0px; | ||
+ | display: inline-table; | ||
+ | overflow: hidden; | ||
+ | background-color: #fff; | ||
+ | border-collapse:collapse; | ||
+ | } | ||
#calview .month .heading td { | #calview .month .heading td { | ||
- | + | background-color:#fff; | |
- | background-color:# | + | color:#000; |
- | color:# | + | |
text-align:center; | text-align:center; | ||
font-size:120%; | font-size:120%; | ||
Line 13: | Line 18: | ||
} | } | ||
- | + | #calview table.month td.today { background-color:#00aeef; color: #fff;} | |
- | #calview table.month td.today { background-color:# | + | |
#calview table.month td { | #calview table.month td { | ||
border: none; | border: none; | ||
margin: 0; | margin: 0; | ||
- | padding: | + | padding: 0px; |
font-weight: bold; | font-weight: bold; | ||
font-size: 10pt; | font-size: 10pt; | ||
text-align: center; | text-align: center; | ||
- | |||
} | } | ||
- | #calview | + | #calview .month .dow td { color:#fff; text-align:center; font-size:110%;} |
- | #calview | + | #calview .month .dow { background-color: #216085; } |
- | + | #calview .odd { background-color: #f2fcff; } | |
- | #calview . | + | |
+ | #calview table { text-align: center; left: 0px; top: 0px; border-spacing: 0px 0px; } | ||
+ | #calview table.month a { padding:4px; background: none; } | ||
+ | #calview .day-active { color:#0000cc; } | ||
+ | #calview .day-empty { color:#ccc; } | ||
+ | /*#calview a:hover { background-color: #ccc; text-decoration: none; } */ | ||
/* Calendar START */ | /* Calendar START */ | ||
Line 41: | Line 48: | ||
overflow: hidden; | overflow: hidden; | ||
width: 180px; | width: 180px; | ||
- | height: | + | height: 185px; |
} | } | ||
Line 48: | Line 55: | ||
text-color: black; | text-color: black; | ||
cursor: pointer; | cursor: pointer; | ||
+ | } | ||
+ | |||
+ | #calscene { | ||
} | } | ||
Line 54: | Line 64: | ||
<html> | <html> | ||
- | |||
<div id="calview"> | <div id="calview"> | ||
+ | <div id="calscene"> | ||
</html> | </html> | ||
- | + | {| | |
- | {| | + | |
|-valign="top" | |-valign="top" | ||
|{{#calendar: query=year=2010 | month=03 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=03 | title=Team:TU_Delft}} | ||
|{{#calendar: query=year=2010 | month=04 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=04 | title=Team:TU_Delft}} | ||
|{{#calendar: query=year=2010 | month=05 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=05 | title=Team:TU_Delft}} | ||
- | |||
|{{#calendar: query=year=2010 | month=06 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=06 | title=Team:TU_Delft}} | ||
|{{#calendar: query=year=2010 | month=07 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=07 | title=Team:TU_Delft}} | ||
|{{#calendar: query=year=2010 | month=08 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=08 | title=Team:TU_Delft}} | ||
- | |||
|{{#calendar: query=year=2010 | month=09 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=09 | title=Team:TU_Delft}} | ||
|{{#calendar: query=year=2010 | month=10 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=10 | title=Team:TU_Delft}} | ||
|{{#calendar: query=year=2010 | month=11 | title=Team:TU_Delft}} | |{{#calendar: query=year=2010 | month=11 | title=Team:TU_Delft}} | ||
|} | |} | ||
- | |||
<html> | <html> | ||
</div> | </div> | ||
Line 83: | Line 89: | ||
function setActiveMonth(mo) { | function setActiveMonth(mo) { | ||
+ | if (mo < 0) mo = 0; | ||
+ | if (mo > 8) mo = 8; | ||
+ | |||
active_month = mo; | active_month = mo; | ||
var el = month_elems[mo]; | var el = month_elems[mo]; | ||
Line 88: | Line 97: | ||
} | } | ||
- | function setCalendarLinks( | + | function setCalendarLinks(fnGetURL) { |
// process each day entry to change the link | // process each day entry to change the link | ||
$("#calview .month").each(function() { | $("#calview .month").each(function() { | ||
- | var month = $.trim( $(". | + | var month = $.trim( $(".month_heading", this).text() ); |
$("a", this).each(function() { | $("a", this).each(function() { | ||
var day = $.trim( $(this).text() ); | var day = $.trim( $(this).text() ); | ||
if ($(".day-active", this).length > 0) | if ($(".day-active", this).length > 0) | ||
- | this.href = | + | this.title = this.href = fnGetURL(day, month, true); |
else | else | ||
- | this.href = | + | this.title = this.href = fnGetURL(day, month, false); |
}); | }); | ||
}); | }); | ||
Line 104: | Line 113: | ||
- | + | function initScrollCalendar() { | |
$("#calview .heading td").each(function() { | $("#calview .heading td").each(function() { | ||
var mo = $(this).text(); | var mo = $(this).text(); | ||
Line 110: | Line 119: | ||
month_elems.push(elem); | month_elems.push(elem); | ||
- | $(this).before('<td class="cal_btn prevmonth_btn"> < </td>') | + | $(this).before('<td class="cal_btn prevmonth_btn"><img src="https://static.igem.org/mediawiki/2010/3/3d/TU_Delft_blog_calendar_prev.png" border="0" /></td>') |
.attr('colspan', 5) | .attr('colspan', 5) | ||
- | .after('<td class="cal_btn nextmonth_btn"> > </td>') | + | .addClass('month_heading') |
- | + | .after('<td class="cal_btn nextmonth_btn"><img src="https://static.igem.org/mediawiki/2010/2/2f/TU_Delft_blog_calendar_next.png" border="0" /></td>'); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
Line 132: | Line 135: | ||
active_month = 0; | active_month = 0; | ||
- | + | $('#calview').scrollTo(month_elems[active_month]); | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 10:44, 13 October 2010
|
|
|
|
|
|
|
|
|