Team:Uppsala/notebook

From 2013.igem.org

(Difference between revisions)
Line 13: Line 13:
<style></style>
<style></style>
-
<script type="text/javascript">
 
-
var month = new Date().getMonth(); 
 
-
var year = new Date().getFullYear(); 
 
-
var cal_table = '';
 
-
var eventString;   
 
-
var days_in_month = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
 
-
var days_with_dirys = new Array('t2013630','t201371','t201372','t201373','t201374','t201375','t201376','t201377','t201379','t201378','t201379','t2013710','t2013711','t2013712','t2013713','t2013714','t2013715','t2013716','t2013717'
 
-
,'t2013718','t2013719','t2013720','t2013721','t2013722','t2013723','t2013724','t2013725','t2013726','t2013727','t2013728','t2013729','t2013730','t2013731','t201381','t201382','t201383','t201384','t201385'
 
-
,'t201386','t201387','t201388','t201389','t2013810','t2013811','t2013812','t2013813','t2013814','t2013815','t2013816','t2013817','t2013818','t2013819','t2013820'
 
-
,'t2013821','t2013822','t2013823','t2013824','t2013825','t2013826','t2013827','t2013828','t2013829','t2013830','t2013831','t201391','t201392','t201393','t201394','t201395','t201396','t201397','t201398','t201399'
 
-
,'t2013910','t2013911','t2013912','t2013913','t2013914','t2013915','t2013919');
 
-
var inputs = 79;
 
-
 
 
-
Date.prototype.getWeek = function()
 
-
{
 
-
  var onejan = new Date(this.getFullYear(),0,1);
 
-
  return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);
 
-
}
 
-
function calendar()
 
-
{
 
-
  var m = month+1;
 
-
  var date = new Date();   
 
-
  var today = date.getDate();   
 
-
  cal_table = ''; 
 
-
  var eventString;
 
-
 
-
  if(year<=200)
 
-
  {
 
-
    year += 1900;
 
-
  }
 
-
  months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
 
-
  var weekDay = new Array('Mon', 'Tue', 'We', 'Thu', 'Fri', 'Sat', 'Sun');
 
-
  days_in_month = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
 
-
 
 
-
if(year%4 == 0)
 
-
  {
 
-
  if( year!=1900 )
 
-
  {
 
-
  days_in_month[1]=29;
 
-
  }
 
-
  }
 
-
 
 
-
    total = days_in_month[month];
 
-
    var date_today = months[month]+' '+year;
 
-
 
-
    cal_table = cal_table + '<table class="cal_calendar" ><tbody id="cal_body"><tr class="head"><th class="arrow"> <input id="left" type="image" onclick="left_arrow()" src="https://static.igem.org/mediawiki/2013/a/a1/Arrowleft.png"></th><th colspan="6" >'+date_today+'</th><th class="arrow"><input id="right" type="image" onclick="right_arrow()" src="https://static.igem.org/mediawiki/2013/0/0b/Arrowright.png"></th></tr>';
 
-
    cal_table = cal_table + '<tr class="cal_d_weeks"><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th><th>Week</th></tr><tr>';
 
-
    week = 0;
 
-
 
 
-
    var first_week_day = new Date(year, month, 0).getDay();
 
-
 
 
-
    for(week_day = 0; week_day < first_week_day; week_day++)
 
-
    {
 
-
      cal_table = cal_table +'<td class="cal_days_bef_aft"></td>';
 
-
      week++;
 
-
    }
 
-
   
 
-
for(i=1;i<=total;i++)
 
-
    {
 
-
        if(week==0)
 
-
        {
 
-
            cal_table = cal_table + '<tr>';
 
-
        }
 
-
   
 
-
                if(year == date.getFullYear())
 
-
        {
 
-
          if(month == date.getMonth()){
 
-
            if(today==i){
 
-
            cal_table = cal_table +'<td id="'+'t'+year+m+i+'" class="cal_today"><input type="submit" onclick="showNotes(year, month, value)" value="'+i+'"></td>';
 
-
          }
 
-
        else{
 
-
        cal_table = cal_table +'<td id="'+'t'+year+m+i+'" class="not_today"><input type="submit" onclick="showNotes(year, month, value)" value="'+i+'"></td>';
 
-
        }
 
-
        }
 
-
        else{
 
-
        cal_table = cal_table +'<td id="'+'t'+year+m+i+'" class="not_today"><input type="submit" onclick="showNotes(year, month, value)" value="'+i+'"></td>';
 
-
        }
 
-
        }
 
-
   
 
-
        else
 
-
        {
 
-
            cal_table = cal_table +'<td id="'+'t'+year+m+i+'" class="not_today"><input type="submit" onclick="showNotes(year, month, value)" value="'+i+'"></td>';
 
-
        }
 
-
     
 
-
              week++;
 
-
  markerNotes(year, m, i);
 
-
        if(week==7)
 
-
        {
 
-
  var weeknr = new Date(year, month, i-1).getWeek();
 
-
  cal_table = cal_table + '<td class="week"><input type="submit" onclick="showNotesOfweek(year, value)" value="'+weeknr+'"></td>';
 
-
        cal_table = cal_table + '</tr>';   
 
-
  week=0;
 
-
        }
 
-
   
 
-
        }
 
-
 
 
-
        for(i=1;week!=0;i++)
 
-
        {
 
-
                cal_table = cal_table + '<td class="cal_days_bef_aft"></td>';
 
-
                week++;
 
-
   
 
-
                if(week==7)
 
-
                { 
 
-
      if(weeknr == 53)
 
-
      {
 
-
      var weeknr = 1;
 
-
      }
 
-
      else
 
-
      {
 
-
      var weeknr = weeknr+1;
 
-
      }
 
-
      cal_table = cal_table + '<td class="week"><input type="submit" onclick="showNotesOfweek(year, value)" value="'+weeknr+'"></td>';
 
-
                        cal_table = cal_table + '</tr>';
 
-
                        week=0;
 
-
                }
 
-
        }
 
-
        cal_table = cal_table + '</tbody></table>';
 
-
}
 
-
 
-
 
-
function left_arrow()
 
-
{
 
-
month = month-1;
 
-
  if(month == -1)
 
-
  {
 
-
  year = year-1;
 
-
  month = 11;
 
-
  }
 
-
calendar();
 
-
document.getElementById('calendar').innerHTML = cal_table;
 
-
}
 
-
 
-
function right_arrow()
 
-
{
 
-
month = month+1;
 
-
  if(month == 12)
 
-
  {
 
-
  year = year+1;
 
-
  month = 0;
 
-
  } 
 
-
calendar();
 
-
document.getElementById('calendar').innerHTML = cal_table;
 
-
}
 
-
 
-
function showNotes(y, m, day)
 
-
{
 
-
  var m = month+1;
 
-
 
-
  eventString =  '<div class="eventBox" id="'+'d'+y+m+day+'" onclick="diry('+y+', '+m+', '+day+');"><h1>'+y+'-'+m+'-'+day+'</h1></div>';
 
-
  document.getElementById('file_holder').innerHTML = eventString;
 
-
}
 
-
 
-
 
-
function showNotesOfweek(y, wnr)
 
-
{
 
-
  var d = new Date(y, 0, 0);
 
-
  if(y == 2012 ){
 
-
wnr++;
 
-
}
 
-
  var w = d.getTime() + 604800000 * (wnr-1);
 
-
  var m = new Date(w).getMonth()+1;
 
-
  var y = new Date(w).getFullYear();
 
-
  var day = new Date(w).getDate();
 
-
 
-
  var e = new Date(w).getDay();
 
-
  day = day - e+1;
 
-
 
 
-
  eventString = '<div class="eventBox" id="'+'d'+y+m+day+'" onclick="diry('+y+', '+m+', '+day+');"><h1>'+y+'-'+m+'-'+day+'</h1></div>';
 
-
 
 
-
  for(i=1;i<7;i++)
 
-
  {
 
-
    if(days_in_month[m-1] == day )
 
-
    {
 
-
    day = 0;
 
-
    m++;
 
-
    if(m>12)
 
-
    {
 
-
      y++;
 
-
      var d = new Date(y, 0, 0);
 
-
      var w = d.getTime() + 604800000 * (wnr-1);
 
-
      var m = 1;
 
-
    }
 
-
   
 
-
    }
 
-
    day++;
 
-
    eventString = eventString + '<div class="eventBox" id="'+'d'+y+m+day+'" onclick="diry('+y+', '+m+', '+day+');"><h1>'+y+'-'+m+'-'+day+'</h1></div>';
 
-
  }
 
-
  document.getElementById('file_holder').innerHTML = eventString;
 
-
  eventString = '';
 
-
}
 
-
function markerNotes(y, m, d)
 
-
{
 
-
var id='t'+y+m+d;
 
-
 
-
for(c = 0; c<=inputs; c++)
 
-
{
 
-
  if(days_with_dirys[c] == id)
 
-
  {
 
-
  cal_table = cal_table + '<style type="text/css">#'+id+'{border: 2px solid #FFA500;}</style>';
 
-
  }
 
-
}
 
-
}
 
-
 
-
function diry(y, m, d)
 
-
{
 
-
var ds = '';  //diryString
 
-
var id = 'd'+y+m+d;
 
-
//var ds = y+'-'+m+'-'+d;
 
-
if(id == 'd2013630')
 
-
{
 
-
  ds= '<p>hej</p>';
 
-
}
 
-
else if(id == 'd201371')
 
-
{
 
-
  ds ='<p>på dig</p>';
 
-
}
 
-
else if(id == 'd201381')
 
-
{
 
-
  ds = '<h1>Thursday 2013-08-01</h1><p>Name of participants: Marcus H, Karl H, Lovisa P, Emil M, Victor S, Hampus.E<br><br><h3>Ongoing constructs:</h3><br>' +
 
-
  '114. pSB1C3-B0034-TAL(MUT)<br>105. pSB3T5-J23101-B0034-TAL<br>107. pSB3T5-CP1-B0034-TAL<br>115. pSB3K5-J23101-B0034-His-TAL<br>116. pSB3T5-J23110-B0034-His-TAL<br>119.pSB1C3-B0034-4CL<br>120.pSB1C3-B0034-HIS-4CL<br>'+
 
-
  '137. pSB3K3-CP8-B0034-TAL<br>138. pSB3K3-CP8-B0034-His-TAL<br>139. pSB3K3-J23101-B0034-BFP<br>171. pSB3T5-J23110-B0034-4CL-B0034-STS<br>172. pSB3T5-CP1-B0034-TAL<br>185. pEL3S17-J23110-B0034-TAL-B0034-4CL-B0034-STS<br>186. pEL3S17-CP1-B0034-4CL-B0034-STS<br>'+
 
-
  '187. pEL3S17-CP8-B0034-4CL-B0034-STS<br>188. pEL3S17-J23101-B0034-4CL-B0034-STS<br>189. pSB3K3-J23101-B0034-TAL<br>204. pEL3S17-J23110-HIS-STS<br>205.pSBLB4C15-CP1-B0034-HIS-TAL<br>206.pSB1C3-J23101-B0034-TAL<br>'+
 
-
 
-
  '<h3>Todays work</h3><br><h3>PCR screening and gel electrophorersis of construct:</h3><br>185.(5-10) pEL3S17-J23110-B0034-TAL-B0034-4CL-B0034-STS<br>'+
 
-
 
-
  '<h3>sequencing prep. of constructs:</h3><br>185.9-185.10<br>'+
 
-
 
-
  '<h3>Transformation of constructs:</h3><br>171. pSB3T5-J23110-B0034-4CL-B0034-STS<br>204. pEL3S17-J23110-HIS-STS<br>205.pSBLB4C15-CP1-B0034-HIS-TAL<br>206.pSB1C3-J23101-B0034-TAL<br><br>'+
 
-
 
-
  '<h3>Results</h3><br>Construct 185, clone 9 and 10, bonds around 3000/4000 bp.<br><br>'+
 
-
 
-
  '<h3>Follow up</h3><br>- <br><br>'+
 
-
 
-
  '<h3>Other experiments</h3><br>-<br></p>';
 
-
}
 
-
else if(id == 'd2013919')
 
-
{
 
-
  ds ='<h1>Uppsala iGEMs Synbioday, 12.15 to 17.00</h1>';
 
-
}
 
-
else
 
-
{
 
-
  ds = 'Nothing happend during this day!';
 
-
}
 
-
document.getElementById(id).setAttribute('onclick','closeNote('+y+', '+m+', '+d+');');
 
-
document.getElementById(id).innerHTML = ds;
 
-
}
 
-
 
-
function closeNote(y, m, d)
 
-
{
 
-
var ds = '';
 
-
var id = 'd'+y+m+d;
 
-
var ds = '<h1>'+y+'-'+m+'-'+d+'</h1>';
 
-
document.getElementById(id).setAttribute('onclick','diry('+y+', '+m+', '+d+');');
 
-
document.getElementById(id).innerHTML = ds;
 
-
}
 
-
 
-
</script>
 
</head>
</head>

Revision as of 13:58, 10 September 2013