Team:TU Delft/pages/blogtest
From 2010.igem.org
(Difference between revisions)
(11 intermediate revisions not shown) | |||
Line 5: | Line 5: | ||
<html> | <html> | ||
<div id="calendar_container" style="width: 300px; float: right;"></html> | <div id="calendar_container" style="width: 300px; float: right;"></html> | ||
- | {{:Team:TU_Delft/ | + | {{:Team:TU_Delft/scroll_calendar}} |
<html></div> | <html></div> | ||
Line 20: | Line 20: | ||
<html> | <html> | ||
<!-- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js"></script> --> | <!-- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js"></script> --> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
Line 39: | Line 33: | ||
var datestr = jQuery.datepicker.formatDate("d_MM_yy", date); | var datestr = jQuery.datepicker.formatDate("d_MM_yy", date); | ||
var url = "/Team:TU_Delft/"+datestr+"_content?action=render"; | var url = "/Team:TU_Delft/"+datestr+"_content?action=render"; | ||
- | + | setActiveMonth(date.getMonth() - 2); | |
dbgout('blog_loadDate: ' + date); | dbgout('blog_loadDate: ' + date); | ||
Line 55: | Line 49: | ||
- | function blog_hashchange_cb() | + | function blog_hashchange_cb() { |
- | { | + | |
- | + | ||
- | + | ||
dbgout('blog_hashchange'); | dbgout('blog_hashchange'); | ||
Line 64: | Line 55: | ||
var kvmap = splitHash(hash); | var kvmap = splitHash(hash); | ||
- | if (kvmap.blog) | + | if (kvmap.blog) |
blog_loadDate($.datepicker.parseDate('d_MM_yy', kvmap.blog)); | blog_loadDate($.datepicker.parseDate('d_MM_yy', kvmap.blog)); | ||
- | |||
} | } | ||
function blogInit() { | function blogInit() { | ||
- | |||
dbgout('blogInit'); | dbgout('blogInit'); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | initScrollCalendar(); | |
- | + | ||
- | + | ||
- | + | setCalendarLinks (function(day, mo, hasEntry) { | |
- | + | // console.log('Day: ' + day + '; Mo: ' + mo + '; hasentry=' + hasEntry); | |
- | + | return makeHash('pages/blogtest', { blog: day + '_' + mo + '_2010'}); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
+ | setHash('pages/blogtest', { blog: $.datepicker.formatDate("d_MM_yy", new Date()) } ); | ||
dbgout('bind hashupdate'); | dbgout('bind hashupdate'); | ||
$(window).bind('hashupdate', blog_hashchange_cb); | $(window).bind('hashupdate', blog_hashchange_cb); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
$(function() { | $(function() { | ||
loadScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js', function() { | loadScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.js', function() { | ||
- | |||
if (jQuery.support.boxModel) { | if (jQuery.support.boxModel) { | ||
Line 137: | Line 81: | ||
window.fbAsyncInit = function() { | window.fbAsyncInit = function() { | ||
FB.init({appId: '132572820109093', status: true, cookie: true, xfbml: true}); | FB.init({appId: '132572820109093', status: true, cookie: true, xfbml: true}); | ||
+ | blogInit(); | ||
}; | }; | ||
Line 144: | Line 89: | ||
} else { | } else { | ||
$("#blog_item_fbcomments").text("Facebook comments unsupported on this browser."); | $("#blog_item_fbcomments").text("Facebook comments unsupported on this browser."); | ||
+ | blogInit(); | ||
} | } | ||
}); | }); | ||
Line 149: | Line 95: | ||
var blogpage_close = function() { | var blogpage_close = function() { | ||
+ | dbgout('unbind hashupdate'); | ||
$(window).unbind('hashupdate', blog_hashchange_cb); | $(window).unbind('hashupdate', blog_hashchange_cb); | ||
}; | }; |
Latest revision as of 14:19, 16 September 2010
Blog
Follow our progress day by day via our blog. Also don't forget to become a fan of our Facebook page or follow us on Twitter.
Calendar
|
|
|
|
|
|
|
|
|
Today's post