Team:TU Delft/scroll calendar

From 2010.igem.org

(Difference between revisions)
Line 88: Line 88:
}
}
-
function setDateClickCallback(cb) {
+
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:
   });
   });
-
// process each day entry to change the link
 
-
   // use the old calendar to find which days have a blog entry
+
   setCalendarLinks (function(day, mo, hasEntry) {
-
  $("#calview .month").each(function() {  
+
-
    var month = $.trim( $(".heading", this).text() );
+
-
     $("a", this).each(function() {
+
     console.log('Day: ' + day + '  Mo: ' + mo + ' ; hasentry=' + hasEntry);
-
      var day = $.trim( $(this).text() );
+
    return '/Team:TU_Delft#page=blogtest&blog=' + day + '_' + mo + '_content';
-
      if ($(".day-active", this).length > 0) {
+
-
        datemap["d"+day+month] = true;
+
-
console.log(day + " " + month + " has entry");
+
-
      }
+
-
      else {
+
-
console.log(day + " " + month + " has no entry");
+
-
      }
+
-
    });
+
   });
   });

Revision as of 16:00, 15 September 2010

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