Template:Team:KULeuven/Notebook/DayNavigator

From 2009.igem.org

(Difference between revisions)
 
(5 intermediate revisions not shown)
Line 1: Line 1:
-
{{Team:KULeuven/Common/JSLibrary}}
 
-
 
<html>
<html>
 +
<script type="text/javascript" src="https://2009.igem.org/wiki/index.php?title=Template:Team:KULeuven/Common/JSLibrary&action=raw"></script>
<script type="text/javascript">
<script type="text/javascript">
<!--
<!--
today = pageDate();
today = pageDate();
-
dmon = getWeekMonday(today);
+
dmin3 = dateDaysFrom(today, -3);
-
dprev = dateDaysFrom(dmon, -1);
+
dmin2 = dateDaysFrom(today, -2);
-
dtue = dateDaysFrom(dmon, 1);
+
dmin1 = dateDaysFrom(today, -1);
-
dwed = dateDaysFrom(dmon, 2);
+
dplus1 = dateDaysFrom(today, 1);
-
dthu = dateDaysFrom(dmon, 3);
+
dplus2 = dateDaysFrom(today, 2);
-
dfri = dateDaysFrom(dmon, 4);
+
dplus3 = dateDaysFrom(today, 3);
-
dsat = dateDaysFrom(dmon, 5);
+
 
-
dsun = dateDaysFrom(dmon, 6);
+
-
dnext = dateDaysFrom(dmon, 7);
+
-
alert('test');
+
-->
-->
</script>
</script>
Line 21: Line 17:
<table id='NBNav'>
<table id='NBNav'>
<tr>
<tr>
-
<td rowspan=3 class='prev'><script type="text/javascript">printLink(dprev, '&lt;&lt;&lt;');</script></td>
+
<script type="text/javascript">
-
<th>Mon</th> <th>Tue</th> <th>Wed</th> <th>Thu</th> <th>Fri</th> <th>Sat</th> <th>Sun</th>
+
<!--
-
<td rowspan=3 class='next'><script type="text/javascript">printLink(dnext, '&gt;&gt;&gt;');</script></td>
+
    document.write("<th class='"+dayNames[dmin3.getDay()]+"'>"+dayNames[dmin3.getDay()]+"</th>");
 +
    document.write("<th class='"+dayNames[dmin2.getDay()]+"'>"+dayNames[dmin2.getDay()]+"</th>");
 +
    document.write("<th class='"+dayNames[dmin1.getDay()]+"'>"+dayNames[dmin1.getDay()]+"</th>");
 +
    document.write("<th class='"+dayNames[today.getDay()]+"'>"+dayNames[today.getDay()]+"</th>");
 +
    document.write("<th class='"+dayNames[dplus1.getDay()]+"'>"+dayNames[dplus1.getDay()]+"</th>");
 +
    document.write("<th class='"+dayNames[dplus2.getDay()]+"'>"+dayNames[dplus2.getDay()]+"</th>");
 +
    document.write("<th class='"+dayNames[dplus3.getDay()]+"'>"+dayNames[dplus3.getDay()]+"</th>");
 +
-->
 +
</script>
</tr>
</tr>
<tr>
<tr>
-
<script type="text/javascript">printDayCell(dmon, dmon.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(dmin3, dmin3.getDate(), today);</script>
-
<script type="text/javascript">printDayCell(dtue, dtue.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(dmin2, dmin2.getDate(), today);</script>
-
<script type="text/javascript">printDayCell(dwed, dwed.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(dmin1, dmin1.getDate(), today);</script>
-
<script type="text/javascript">printDayCell(dthu, dthu.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(today, today.getDate(), today);</script>
-
<script type="text/javascript">printDayCell(dfri, dfri.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(dplus1, dplus1.getDate(), today);</script>
-
<script type="text/javascript">printDayCell(dsat, dsat.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(dplus2, dplus2.getDate(), today);</script>
-
<script type="text/javascript">printDayCell(dsun, dsun.getDate(), today);</script>
+
<script type="text/javascript">printDayCell(dplus3, dplus3.getDate(), today);</script>
</tr>
</tr>
<script type="text/javascript">
<script type="text/javascript">
<!--
<!--
-
   if(dmon.getMonth() == dsun.getMonth()) {
+
   m = monthNames[today.getMonth()];
-
      m1 = "";
+
-
      m2 = monthNames[dmon.getMonth()];
+
-
  } else {
+
-
      m1 = monthNames[dmon.getMonth()];
+
-
      m2 = monthNames[dsun.getMonth()];
+
-
  }
+
-
   document.write('<tr><th class="left" colspan=4>'+m1+'</th><th class="right" colspan=3>'+m2+'</th></tr>');
+
   document.write('<tr><th class="center" colspan=7>'+m+'</th></tr>');
-->
-->
</script>
</script>
Line 51: Line 49:
</table>
</table>
</center>
</center>
 +
</html>
</html>

Latest revision as of 09:32, 17 July 2009