Team:TU Delft/pages/blogtest

From 2010.igem.org

(Difference between revisions)
 
(7 intermediate revisions not shown)
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> -->
-
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
 
-
<style>
 
-
.ui-datepicker.ui-widget-content .ui-state-default { background: none; }
 
-
.ui-widget-content .day_with_blog a.ui-state-default { background-color: #ccc; }
 
-
.ui-widget-content .day_no_blog a.ui-state-default { background-color: #eee; }
 
-
</style>
 
<script type="text/javascript">
<script type="text/javascript">
Line 37: Line 31:
function blog_loadDate(date) {
function blog_loadDate(date) {
-
//  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() {
-
{
+
-
//  alert('blog hash update ' + location.hash);
+
-
 
+
   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');
-
+
 
-
   setHash('pages/blogtest', { blog: $.datepicker.formatDate("d_MM_yy", c) } );
+
  initScrollCalendar();
-
  blog_loadDate(c);
+
 
 +
  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);
-
 
-
  return c;
 
}
}

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

March
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
April
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
May
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
June
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
July
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
August
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
September
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
October
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
November
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30

Today's post