Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
 
(237 intermediate revisions not shown)
Line 15: Line 15:
   font-family: Arial, Times, serif;
   font-family: Arial, Times, serif;
   font-size: 12pt;
   font-size: 12pt;
-
}  
+
}
 +
 
 +
h2 {
 +
color: #3b71b6;
 +
font-size: 130%;
 +
}
 +
 
 +
h3 {
 +
  font-size: 150%;
 +
  color: #2b6196;
 +
  text-align: center;
 +
  line-height: 40px;
 +
}
 +
 
 +
.toc{
 +
display: none;
 +
}
 +
 
 +
.right {
 +
float: right;
 +
cursor: deafault;
 +
margin-right: 10px;
 +
margin-top: 10px;
 +
vertical-align: top;
 +
}
 +
 
 +
 
 +
#flags{
 +
float:right;
 +
}
.main_frame {
.main_frame {
-
margin-left: 30px;
+
margin-left: 20px;
-
margin-right: 30px;
+
margin-right: 20px;
 +
  margin-top: 30px;
 +
}
 +
 
 +
.content {
 +
  margin-left: 230px;
 +
  border-top: 1px solid #2b6196;
 +
  min-height: 500px;
 +
  text-align: justify;
 +
}
 +
 
 +
.content img {
 +
text-align: center;
}
}
a {
a {
color: #2b6196;
color: #2b6196;
 +
text-decoration: underline;
}
}
a:visited {
a:visited {
color: #428c36;
color: #428c36;
 +
}
 +
 +
hr {
 +
color: #2b6196;
 +
background-color: #2b6196;
 +
 +
}
 +
 +
.counter {
 +
margin: 10px;
 +
margin-top: 30px;
 +
text-align: center;
 +
  font-weight: bold !important;
 +
}
 +
 +
 +
.counter a {
 +
color: #2b6196;
}
}
Line 35: Line 95:
}
}
 +
.gallery {
 +
border: 8px solid #fbc089;
 +
border-radius: 10px;
 +
margin-top: 30px;
 +
margin-left: -2px !important;
 +
margin-right: 8px;
 +
}
 +
.gallery p{
 +
margin: 0px
 +
}
 +
 +
.nomargin {
 +
margin: 0px;
 +
}
 +
 +
.social {
 +
margin-top: 30px;
 +
margin-right: 10px;
 +
text-align: center;
 +
  font-size: 150%;
 +
}
 +
 +
.social a, .social a:visited {
 +
color: #2b6196 !important;
 +
text-decoration: underline;
 +
}
 +
 +
.social p {
 +
  margin: 0px;
 +
}
 +
.menu {
.menu {
     background-color: #fff;
     background-color: #fff;
Line 40: Line 131:
     font-weight: bold;
     font-weight: bold;
     font-family: Perpetua, serif;
     font-family: Perpetua, serif;
 +
font-size: 15pt;
}
}
-
.nomargin {
+
.menu a {
-
margin: 0px;
+
  text-decoration: none;
}
}
.menu a:visited {
.menu a:visited {
color: #2b6196;
color: #2b6196;
 +
}
 +
 +
table {
 +
  border-collapse: collapse;
 +
}
 +
 +
.members_table td {
 +
vertical-align: middle;
}
}
Line 69: Line 169:
     float: left;
     float: left;
     width:220px;
     width:220px;
 +
    margin-top: -5px;
     font-family: Perpetua, serif;
     font-family: Perpetua, serif;
-
    margin-right: 50px;
 
}
}
#side_menu a, #side_menu a:visited{
#side_menu a, #side_menu a:visited{
-
   color: #308020;
+
   color: #106000;
-
   margin: 5px;
+
   text-decoration: none;
}
}
#side_menu ul {
#side_menu ul {
Line 84: Line 184:
#side_menu ul li{
#side_menu ul li{
     margin-right: 10px;
     margin-right: 10px;
-
     font-size: 13.5pt;
+
     font-size: 14pt;
 +
 
     font-weight: bold;
     font-weight: bold;
     display: block;
     display: block;
     border: 1px solid;
     border: 1px solid;
 +
    border-radius: 10px;
background-color: #acd8a6;
background-color: #acd8a6;
-
padding: 7px;
+
padding: 3px;
 +
padding-right: 5px;
 +
padding-left: 10px;
margin-bottom: 5px;
margin-bottom: 5px;
}  
}  
 +
 +
.home_side_menu_item {
 +
  background-color: #b5d4f3 !important;
 +
  color: #003366 !important;
 +
  border: 1px 0px 0px 0px;
 +
  margin: 0px;
 +
}
 +
 +
.home_side_menu_item a {
 +
  color: #003366 !important;
 +
 +
}
 +
.home_side_menu_item .selflink {
 +
  color: #904400 !important;
 +
  margin-right: 6px !important;
 +
}
ul {
ul {
  line-height: 110%;
  line-height: 110%;
 +
list-style-type: disc;
 +
list-style-image: none;
 +
}
 +
 +
li {
 +
line-height: 1.5em;
}
}
Line 100: Line 226:
     display: none;
     display: none;
     left: -20px;
     left: -20px;
 +
    margin-top: 5px;
}
}
Line 107: Line 234:
   display: block;
   display: block;
   margin-right: 10px;
   margin-right: 10px;
-
border: none !important;
+
margin-bottom: 0px !important;
 +
border-bottom: 0px !important;
 +
border-top: 1px;
 +
border-left: 0px !important;
 +
border-right: 0px !important;
 +
border-radius: 0px !important;
 +
border-color: #308020 !important;
 +
}
 +
 
 +
li.home_side_menu_subitem {
 +
  margin-left: 15px;
 +
  display: block;
 +
  margin-right: 10px;
 +
margin-bottom: 0px !important;
 +
border-bottom: 0px !important;
 +
border-top: 1px;
 +
border-left: 0px !important;
 +
border-right: 0px !important;
 +
border-radius: 0px !important;
}
}
Line 120: Line 265:
   position: relative;
   position: relative;
   display: block;
   display: block;
 +
}
 +
 +
.side_menu_item a{
 +
  margin-right: 6px;
 +
}
 +
 +
#globalWrapper {
 +
  font-size: 100%;
 +
}
 +
 +
#calendarPicker {
 +
  margin-bottom: 40px;
 +
}
 +
 +
.monthSelector {
 +
font-size: 110%;
 +
  text-align: left !important;
 +
  color : #2b6196;
 +
font-weight: bold;
 +
margin-right: 6px;
 +
}
 +
 +
.calHeader {
 +
    background-color: #2b6196;
 +
color: white;
 +
}
 +
 +
.sunday {
 +
  background-color: #acd8a6;
 +
  background-color: #9ac5f4
 +
}
 +
 +
.saturday {
 +
  background-color:#dcffc6;
 +
  background-color: #cee1f4;
 +
}
 +
.weekday {
 +
  background-color: white;
 +
}
 +
 +
.selectedDate {
 +
  background-color: #FFFF99;
 +
  background-color: white;
 +
}
 +
 +
.calendar  tr td{
 +
  width: 35px;
 +
text-align: center;
 +
}
 +
 +
td.weekday a:visited, td.sunday a:visited, td.saturday a:visited, td.selectedDate a:visited {
 +
  color: #2b6196;
 +
}
 +
 +
.noEntries {
 +
  color: #999;
 +
}
 +
 +
.hasEntries {
 +
  font-weight: bold;
 +
}
 +
 +
.notebookEntry {
 +
  margin-bottom: 40px;
 +
}
 +
 +
.backToTop {
 +
text-align: right;
 +
}
 +
 +
.backToTop a:visited{
 +
color: #2b6196;
 +
}
 +
 +
.menu_button {
 +
  display: none;
 +
}
 +
 +
.selflink {
 +
  color: #001f3d !important;
 +
  cursor: default !important;
 +
margin-right: 6px;
 +
  text-decoration: none !important;
}
}
Line 126: Line 354:
          
          
<script type="text/javascript">
<script type="text/javascript">
-
     
+
   
 +
$(function() {
 +
var touchscreen = ("ontouchstart" in document.documentElement);
 +
var active=1;
 +
var menu_buttons = $(".menu_button");
 +
$(menu_buttons).css("display", "table-cell");
 +
    for (var i=0; i< menu_buttons.length; i++) {
 +
    active=1;
 +
    var menu_links = $(menu_buttons[i]).children("a");
 +
    for (var j=0; j < menu_links.length; j++) {
 +
            if (menu_links[j].href.indexOf("Team:Edinburgh/") > -1) {
 +
                if (window.location.href.indexOf(menu_links[j].href) > -1) {
 +
                    active = 3;
 +
                }
 +
            } else if ($(".home_side_menu_item").length> 0 ) {
 +
active = 3;
 +
            }
 +
}
 +
$(menu_links).css("display", "none");
 +
    menu_links[active-1].style.display = "block";
 +
 +
if (active==3) {
 +
$(menu_buttons[i]).parent("tr").siblings(":last").children("td").filter(function(index) {return index==i}).children("a").addClass("selflink");
 +
}
 +
 
 +
if (touchscreen) continue;
 +
 +
menu_buttons[i].onmouseover = (function() {
 +
var children = $(menu_buttons[i]).children("a");
 +
return function() {
 +
$(children).css("display", "none");
 +
children[1].style.display = "block";
 +
}
 +
})();
 +
 +
menu_buttons[i].onmouseout = (function() {
 +
var children = $(menu_buttons[i]).children("a");
 +
return function() {
 +
active=1;
 +
for (var j=0; j < children.length; j++) {
 +
if (children[j].href.indexOf("Team:Edinburgh/") > -1) {
 +
if (window.location.href.indexOf(children[j].href) > -1) {
 +
active = 3;
 +
}
 +
} else if ($(".home_side_menu_item").length> 0 ) {
 +
active = 3;
 +
}
 +
}
 +
$(children).css("display", "none");
 +
children[active-1].style.display = "block";
 +
}
 +
})();
 +
}
 +
 
 +
    menu_links = $("#side_menu_items > li > a");
 +
 
 +
for (var j=0; j < menu_links.length; j++) {
 +
active=1;
 +
if (window.location.href.indexOf(menu_links[j].href, window.location.href.length-menu_links[j].href.length) > -1) {
 +
active = 3;
 +
}
 +
if (active==3) {
 +
$(menu_links[j]).addClass("selflink");
 +
}
 +
}    
 +
});
 +
 +
$(function() {
 +
 
 +
    $(".bagpipes").attr("src", "//www.youtube.com/embed/Z_AHBSvXHDM?rel=0");
 +
$(".genablerlinkers").attr("src", "http://www.genablerlinkers.appspot.com");
 +
$(".outreachvideo").attr("src", "//www.youtube.com/embed/t7wQX_EFrdY?rel=0");
 +
 
 +
});
 +
 +
var gallery_active_id = 0;
 +
 
$(function() {
$(function() {
     $(".selflink").parentsUntil($("#side_menu"), "li").children("ul").css("display","block");
     $(".selflink").parentsUntil($("#side_menu"), "li").children("ul").css("display","block");
 +
 +
});
 +
 +
$(function() {
 +
      $(".gallery img").css("display", "none");
 +
      if ($(".gallery img")[gallery_active_id]) $(".gallery img")[gallery_active_id].style.display="block";
 +
      setInterval("changeGalleryPic()", 5000) ; 
 +
 +
});
 +
 +
function changeGalleryPic() {
 +
      gallery_active_id += 1;
 +
      if (gallery_active_id >= $(".gallery img").length) gallery_active_id = 0;
 +
      $(".gallery img").css("display", "none");
 +
      if ($(".gallery img")[gallery_active_id]) $(".gallery img")[gallery_active_id].style.display="block";
 +
}
 +
 +
$(function() {
 +
 +
$("#flags img").css("cursor", "pointer");
 +
$("#flags img").css("cursor", "hand");
 +
 +
$("#languages").children("div").css("display", "none"); $("#english").css("display", "block");
 +
 +
    var english = $("#flags img")[0];
 +
    if(english) english.onclick=function() {$("#languages").children("div").css("display", "none"); $("#english").css("display", "block")};
 +
 +
    var french= $("#flags img")[1];
 +
    if(french) french.onclick=function() {$("#languages").children("div").css("display", "none"); $("#french").css("display", "block")};
 +
 +
var german= $("#flags img")[2];
 +
    if(german) german.onclick=function() {$("#languages").children("div").css("display", "none"); $("#german").css("display", "block")};
 +
 +
    var chinese = $("#flags img")[3];
 +
    if(chinese ) chinese .onclick=function() {$("#languages").children("div").css("display", "none"); $("#chinese ").css("display", "block")};
 +
 +
  var polish = $("#flags img")[4];
 +
    if(polish ) polish .onclick=function() {$("#languages").children("div").css("display", "none"); $("#polish ").css("display", "block")};
 +
 +
    var lithuanian= $("#flags img")[5];
 +
    if(lithuanian) lithuanian.onclick=function() {$("#languages").children("div").css("display", "none"); $("#lithuanian").css("display", "block")};
 +
 +
  var bulgarian = $("#flags img")[6];
 +
    if(bulgarian ) bulgarian .onclick=function() {$("#languages").children("div").css("display", "none"); $("#bulgarian ").css("display", "block")};
 +
 +
    var greek = $("#flags img")[7];
 +
    if(greek ) greek.onclick=function() {$("#languages").children("div").css("display", "none");
 +
$("#greek ").css("display", "block")};
 +
});
});
Line 140: Line 493:
     });
     });
-
$(function() {
+
 
-
  var menu_buttons = document.getElementsByClassName("menu_button");
+
-
  for (var i = 0; i < menu_buttons.length; i++) {
+
-
      var count = 0;
+
-
      var active=1;
+
-
      var children = menu_buttons[i].childNodes;
+
-
      for (var j=0; j< children.length; j++) {
+
-
          if (children[j].tagName == "A") {
+
-
            if (window.location.href.indexOf(children[j].href,window.location.href.length - children[j].href.length) > -1) {
+
-
                if (active==1) active = 3;
+
-
              }
+
-
          }
+
-
      }
+
-
      for (var j=0; j< children.length; j++) {
+
-
          if (children[j].tagName == "A") {
+
-
              var grandchildren = children[j].childNodes;
+
-
      for (var k=0; k< grandchildren.length; k++) {
+
-
if (grandchildren[k].tagName == "IMG") {
+
-
                    count = count + 1;
+
-
                    if (count==active) {
+
-
                        grandchildren[k].style.display = "block";
+
-
                    } else {
+
-
                        grandchildren[k].style.display = "none";
+
-
                    }
+
-
                }
+
-
              }
+
-
          }
+
-
      }
+
-
      menu_buttons[i].onmouseover = (function() {
+
-
        var children = menu_buttons[i].childNodes;
+
-
        return function() {
+
-
            var count = 0;
+
-
            var active = 2;
+
-
            for (var j=0; j< children.length; j++) {
+
-
              if (children[j].tagName == "A") {
+
-
                    var grandchildren = children[j].childNodes;
+
-
            for (var k=0; k< grandchildren.length; k++) {
+
-
        if (grandchildren[k].tagName == "IMG") {
+
-
                          count = count + 1;
+
-
                          if (count==active) {
+
-
                              grandchildren[k].style.display = "block";
+
-
                          } else {
+
-
                              grandchildren[k].style.display = "none";
+
-
                          }
+
-
                        }
+
-
                    }
+
-
                }
+
-
              }
+
-
          }
+
-
      })();
+
-
    menu_buttons[i].onmouseout = (function() {
+
-
        var children = menu_buttons[i].childNodes;
+
-
        return function() {
+
-
            var count = 0;
+
-
            var active = 1;
+
-
            for (var j=0; j< children.length; j++) {
+
-
              if (children[j].tagName == "A") {
+
-
                    if (window.location.href.indexOf(children[j].href,window.location.href.length - children[j].href.length) > -1) {
+
-
                        if (active==1) active = 3;
+
-
                    }
+
-
                }
+
-
            }
+
-
            for (var j=0; j< children.length; j++) {
+
-
                if (children[j].tagName == "A") {
+
-
                    var grandchildren = children[j].childNodes;
+
-
            for (var k=0; k< grandchildren.length; k++) {
+
-
        if (grandchildren[k].tagName == "IMG") {
+
-
                          count = count + 1;
+
-
                          if (count==active) {
+
-
                              grandchildren[k].style.display = "block";
+
-
                          } else {
+
-
                              grandchildren[k].style.display = "none";
+
-
                          }
+
-
                        }
+
-
                    }
+
-
                }
+
-
              }
+
-
          }
+
-
      })();     
+
-
  }
+
-
});
+
-
</script>
+
</script>  
<script type="text/javascript">
<script type="text/javascript">
 +
//Javascript name: My Date Time Picker
//Javascript name: My Date Time Picker
Line 242: Line 516:
var MonthName=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var MonthName=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var WeekDayName=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday"];
var WeekDayName=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", "Sunday"];
 +
var DaysInMonth=[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
//Configurable parameters
 
-
var WeekChar=3;//number of character for week day. if 2 then Mo,Tu,We. if 3 then Mon,Tue,Wed.
 
-
var CellWidth=40;//Width of day cell.
 
-
 
-
var MonthYearColor="#cc0033";//Font Color of Month and Year in Calendar header.
 
-
var WeekHeadColor="#0099CC";//Background Color in Week header.
 
-
var SundayColor="#6699FF";//Background color of Sunday.
 
-
var SaturdayColor="#CCCCFF";//Background color of Saturday.
 
-
var WeekDayColor="white";//Background color of weekdays.
 
-
var FontColor="blue";//color of font in Calendar day cell.
 
-
var TodayColor="#FFFF33";//Background color of today.
 
-
var SelDateColor="#FFFF99";//Backgrond color of selected date in textbox.
 
-
var YrSelColor="#cc0033";//color of font of Year selector.
 
-
var ThemeBg="";//Background image of Calendar window.
 
//end Configurable parameters
//end Configurable parameters
//end Global variable
//end Global variable
Line 276: Line 537:
var vFirstDay;
var vFirstDay;
-
calhtml = "<form name='Calendar'>";
+
calhtml = "<p><h3>Calendar: </h3></p>";
-
vCalHeader="<table border=1 cellpadding=1 cellspacing=1 width='100%' align=\"center\" valign=\"top\">\n";
+
vCalHeader="<table class=\"calendar\" border='1' cellpadding='1' cellspacing='1' align=\"center\" valign=\"top\">\n";
//Month Selector
//Month Selector
-
vCalHeader+="<tr>\n<td colspan='7'><table border=0 cellpadding=0 cellspacing=0><tr><td align='left'>\n";
+
vCalHeader+="<tr>\n<td class=\"monthSelector\" colspan='7'>\n";
vCalHeader+="<select name=\"MonthSelector\" onChange=\"javascript:Cal.SwitchMth(this.selectedIndex+5);RenderCal();\">\n";
vCalHeader+="<select name=\"MonthSelector\" onChange=\"javascript:Cal.SwitchMth(this.selectedIndex+5);RenderCal();\">\n";
for (i=5;i<10;i++)
for (i=5;i<10;i++)
Line 288: Line 549:
else
else
SelectStr="";
SelectStr="";
-
vCalHeader+="<option "+SelectStr+" value >"+MonthName[i]+"\n";
+
vCalHeader+="<option "+SelectStr+" >"+MonthName[i]+"\n";
}
}
-
vCalHeader+="</select></td>";
+
vCalHeader+="</select>   "+Cal.GetMonthName()+" "+Cal.Year+"</td></tr>\n";
-
//Calendar header shows Month and Year
+
-
vCalHeader+="<tr><td colspan='7'><font face='Verdana' size='2' align='center' color='"+MonthYearColor+"'><b>"+Cal.GetMonthName()+" "+Cal.Year+"</b></font></td></tr>\n";
+
//Week day header
//Week day header
-
vCalHeader+="<tr bgcolor="+WeekHeadColor+">";
+
vCalHeader+="<tr>";
for (i=0;i<7;i++)
for (i=0;i<7;i++)
{
{
-
vCalHeader+="<td width="+CellWidth+" align='center'><font face='Verdana' size='2'>"+WeekDayName[i].substr(0,WeekChar)+"</font></td>";
+
vCalHeader+="<td class=\"calHeader\">" +WeekDayName[i].substr(0,3)+ "</td>";
}
}
vCalHeader+="</tr>";
vCalHeader+="</tr>";
Line 303: Line 562:
//Calendar detail
//Calendar detail
-
CalDate=new Date(Cal.Year,Cal.Month);
+
vFirstDay=new Date(Cal.Year,Cal.Month, 1).getDay();
-
CalDate.setDate(1);
+
-
vFirstDay=CalDate.getDay();
+
vCalData="<tr>";
vCalData="<tr>";
-
+
if (vFirstDay==0) vFirstDay = 7;
if (vFirstDay==0) vFirstDay = 7;
for (i=0;i<vFirstDay-1;i++)
for (i=0;i<vFirstDay-1;i++)
{
{
-
vCalData=vCalData+GenCell();
 
vDayCount=vDayCount+1;
vDayCount=vDayCount+1;
 +
if (vDayCount%7==6)
 +
vCalData += GenCell("","saturday");
 +
else if (vDayCount%7==0)
 +
vCalData += GenCell("","sunday");
 +
else
 +
vCalData += GenCell("","weekday");
}
}
for (j=1;j<=Cal.GetMonDays();j++)
for (j=1;j<=Cal.GetMonDays();j++)
{
{
-
var strCell;
+
 
vDayCount=vDayCount+1;
vDayCount=vDayCount+1;
if (j==Cal.Date)
if (j==Cal.Date)
{
{
-
strCell=GenCell(j,true,SelDateColor);
+
vCalData += GenCell(j,"selectedDate");
}
}
else
else
{  
{  
-
if (vDayCount%7==0)
+
if (vDayCount%7==6)
-
strCell=GenCell(j,false,SaturdayColor);
+
vCalData += GenCell(j,"saturday");
-
else if ((vDayCount+6)%7==0)
+
else if (vDayCount%7==0)
-
strCell=GenCell(j,false,SundayColor);
+
vCalData += GenCell(j,"sunday");
else
else
-
strCell=GenCell(j,null,WeekDayColor);
+
vCalData += GenCell(j,"weekday");
}
}
-
vCalData=vCalData+strCell;
 
-
if((vDayCount%7==0)&&(j<Cal.GetMonDays()))
+
if((vDayCount%7==0)*(j<Cal.GetMonDays()))
{
{
vCalData=vCalData+"</tr>\n<tr>";
vCalData=vCalData+"</tr>\n<tr>";
}
}
}
}
 +
var vLastDay=new Date(Cal.Year,Cal.Month, Cal.GetMonDays()).getDay();
 +
if (vLastDay == 0) vLastDay = 7; 
 +
for (i=vLastDay;i<7;i++)
 +
{
 +
vDayCount=vDayCount+1;
 +
if (vDayCount%7==6)
 +
vCalData += GenCell("","saturday");
 +
else if (vDayCount%7==0)
 +
vCalData += GenCell("","sunday");
 +
else
 +
vCalData += GenCell("","weekday");
 +
}
 +
calhtml += vCalData;
calhtml += vCalData;
//end time picker
//end time picker
calhtml += "\n</table>";
calhtml += "\n</table>";
-
calhtml += "</form>";
 
document.getElementById("calendarPicker").innerHTML = calhtml;
document.getElementById("calendarPicker").innerHTML = calhtml;
}
}
-
function GenCell(pValue,pHighLight,pColor)//Generate table cell with value
+
function GenCell(pValue, css_class)//Generate table cell with value
{
{
-
var PValue;
+
    var hash = pValue +"-" + Cal.GetMonthName();
-
var vColor;
+
if (document.getElementById(hash)) {
-
var vHLstr1;//HighLight string
+
return "<td class='" + css_class + " hasEntries'> <a href='#" + hash + "'>"+pValue +"</a></td>";
-
var vHlstr2;
+
} else {
-
var vTimeStr;
+
return "<td class='" + css_class + " noEntries'>" + pValue +"</td>";
-
+
}
-
if (pValue==null)
+
-
PValue="";
+
-
else
+
-
PValue=pValue;
+
-
+
-
if (pColor!=null)
+
-
vColor="bgcolor=\""+pColor+"\"";
+
-
else
+
-
vColor="";
+
-
if ((pHighLight!=null)&&(pHighLight))
+
-
{vHLstr1="color='red'><b>";vHLstr2="</b>";}
+
-
else
+
-
{vHLstr1=">";vHLstr2="";}
+
-
+
-
+
-
var PCellStr="<td "+vColor+" width="+CellWidth+" align='center'><font face='verdana' size='2'"+vHLstr1+"<a href=\"javascript:alert(5)\">"+PValue+"</a>"+vHLstr2+"</font></td>";
+
-
return PCellStr;
+
}
}
Line 379: Line 635:
this.Month=pDate.getMonth();//selected month number
this.Month=pDate.getMonth();//selected month number
this.Year=pDate.getFullYear();//selected year in 4 digits
this.Year=pDate.getFullYear();//selected year in 4 digits
-
 
-
this.Format="ddMMyyyy";
 
-
this.Separator="/";
 
-
}
 
-
 
-
function GetMonthIndex(shortMonthName)
 
-
{
 
-
for (i=0;i<12;i++)
 
-
{
 
-
if (MonthName[i].substring(0,3).toUpperCase()==shortMonthName.toUpperCase())
 
-
{ return i;}
 
-
}
 
}
}
-
Calendar.prototype.GetMonthIndex=GetMonthIndex;
 
function SwitchMth(intMth)
function SwitchMth(intMth)
Line 406: Line 649:
function GetMonDays()//Get number of days in a month
function GetMonDays()//Get number of days in a month
{
{
-
var DaysInMonth=[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
 
return DaysInMonth[this.Month];
return DaysInMonth[this.Month];
}
}
Calendar.prototype.GetMonDays=GetMonDays;
Calendar.prototype.GetMonDays=GetMonDays;
 +
-
function FormatDate(pDate)
+
$(function() {
-
{
+
  if (document.getElementById("calendarPicker")) {
-
if (this.Format.toUpperCase()=="DDMMYYYY")
+
NewCal();
-
return (pDate+DateSeparator+(this.Month+1)+DateSeparator+this.Year);
+
-
else if (this.Format.toUpperCase()=="DDMMMYYYY")
+
-
return (pDate+DateSeparator+this.GetMonthName(false)+DateSeparator+this.Year);
+
-
else if (this.Format.toUpperCase()=="MMDDYYYY")
+
-
return ((this.Month+1)+DateSeparator+pDate+DateSeparator+this.Year);
+
-
else if (this.Format.toUpperCase()=="MMMDDYYYY")
+
-
return (this.GetMonthName(false)+DateSeparator+pDate+DateSeparator+this.Year);
+
}
}
-
Calendar.prototype.FormatDate=FormatDate;
+
});
$(function() {
$(function() {
-
  if (document.getElementById("calendarPicker")) NewCal();
+
var notebookEntries = document.getElementsByClassName("notebookEntry");
 +
for (var i = 0; i < notebookEntries.length; i++ ) {
 +
notebookEntries[i].innerHTML += "<p class='backToTop' ><a href='#top'>Back to top</a></p>"
 +
  }
 +
});
 +
 
 +
 
-
});
 
</script>
</script>
</head>
</head>
<body>
<body>

Latest revision as of 00:27, 5 October 2013