|
|
Line 2: |
Line 2: |
| <div id="pageProject"> | | <div id="pageProject"> |
| | | |
- | <script type="text/javascript">
| |
- |
| |
- | var globalDay;
| |
- | var globalMonth;
| |
- |
| |
- | $(document).ready(function(){
| |
- | $(".month").click(function(){
| |
- | selectMonth($(this).text());
| |
- | });
| |
- | $("#backMenu").click(function(){
| |
- | $("#page").animate({opacity:0},500,'linear',function(){
| |
- | $("#page").hide();
| |
- | $("#menu").show();
| |
- | $("#menu").animate({width:'100%'});
| |
- | });
| |
- | });
| |
- | $("#boutonNotebook").click(function(){
| |
- | $("#projectDescriptionContent").hide();
| |
- | $("#projectDescriptionContent").css("opacity","0");
| |
- | $("#notebookContent").show();
| |
- | $("#notebookContent").animate({opacity:1});
| |
- | });
| |
- |
| |
- | $("#boutonProjectDescription").click(function(){
| |
- | $("#notebookContent").hide();
| |
- | $("#notebookContent").css("opacity","0");
| |
- | $("#projectDescriptionContent").show();
| |
- | $("#projectDescriptionContent").animate({opacity:1});
| |
- | });
| |
- |
| |
- | $("#backMenu").mouseover(function(){
| |
- | $(this).css("opacity","0.6");
| |
- | });
| |
- |
| |
- | $("#backMenu").mouseout(function(){
| |
- | $(this).css("opacity","1");
| |
- | });
| |
- |
| |
- | $(".boutonOnglet").mouseover(function(){
| |
- | $(this).css("opacity","0.6");
| |
- | });
| |
- |
| |
- | $(".boutonOnglet").mouseout(function(){
| |
- | $(this).css("opacity","1");
| |
- | });
| |
- |
| |
- | $("#jourPrecedent").click(function(){previousDay(globalMonth,globalDay)});
| |
- |
| |
- | $("#jourSuivant").click(function(){nextDay(globalMonth,globalDay)});
| |
- | });
| |
- |
| |
- |
| |
- | function selectMonth(month_name)
| |
- | {
| |
- | $(".textContent").html("");
| |
- | if (window.XMLHttpRequest)
| |
- | {// code for IE7+, Firefox, Chrome, Opera, Safari
| |
- | xmlhttp=new XMLHttpRequest();
| |
- | }
| |
- | else
| |
- | {// code for IE6, IE5
| |
- | xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
| |
- | }
| |
- | xmlhttp.open("GET","https://static.igem.org/mediawiki/2012/f/f5/Journal.txt",false);
| |
- | xmlhttp.send();
| |
- | xmlDoc=xmlhttp.responseXML;
| |
- |
| |
- | var x=xmlDoc.getElementsByTagName("month");
| |
- | for (i=0;i<x.length;i++)
| |
- | {
| |
- | if (x[i].getAttribute("name")==month_name)
| |
- | {
| |
- | var jour=x[i].getElementsByTagName("jour");
| |
- | $(".textContent").append("<div class='titreExp'></div>");
| |
- | $(".titreExp").append(jour[0].getElementsByTagName("titre")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append("<div class='dateExp'></div>");
| |
- | $(".dateExp").append(" - " + jour[0].getElementsByTagName("date")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append("<div class='descExp'></div>");
| |
- | $(".descExp").append(jour[0].getElementsByTagName("description")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append(" <object width='480' height='350'><param name='allowFullScreen' value='true'></param><param name='allowScriptAccess' value='always'></param> <embed class='diapoExp' src='no' type='application/x-shockwave-flash' width='480' height='350' allowscriptaccess='always' allowfullscreen='true'></embed></object>");
| |
- | $(".diapoExp").attr("src","http://pf.kizoa.com/sflite.swf?did="+jour[0].getElementsByTagName('diaporama')[0].getAttribute('did')+"&k="+jour[0].getElementsByTagName('diaporama')[0].getAttribute('pk')+"");
| |
- | }
| |
- | }
| |
- | globalDay=0;
| |
- | globalMonth=month_name;
| |
- | }
| |
- |
| |
- | function nextDay(month_name,day)
| |
- | {
| |
- | $(".textContent").html("");
| |
- | if (window.XMLHttpRequest)
| |
- | {// code for IE7+, Firefox, Chrome, Opera, Safari
| |
- | xmlhttp=new XMLHttpRequest();
| |
- | }
| |
- | else
| |
- | {// code for IE6, IE5
| |
- | xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
| |
- | }
| |
- | xmlhttp.open("GET","https://static.igem.org/mediawiki/2012/f/f5/Journal.txt",false);
| |
- | xmlhttp.send();
| |
- | xmlDoc=xmlhttp.responseXML;
| |
- | var newDay=day+1;
| |
- | var x=xmlDoc.getElementsByTagName("month");
| |
- | for (i=0;i<x.length;i++)
| |
- | {
| |
- | if (x[i].getAttribute("name")==month_name)
| |
- | {
| |
- | var jour=x[i].getElementsByTagName("jour");
| |
- | if (jour.length>newDay)
| |
- | {
| |
- | $(".textContent").append("<div class='titreExp'></div>");
| |
- | $(".titreExp").append(jour[newDay].getElementsByTagName("titre")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append("<div class='dateExp'></div>");
| |
- | $(".dateExp").append(" - " + jour[newDay].getElementsByTagName("date")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append("<div class='descExp'></div>");
| |
- | $(".descExp").append(jour[newDay].getElementsByTagName("description")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append(" <object width='480' height='350'><param name='allowFullScreen' value='true'></param><param name='allowScriptAccess' value='always'></param> <embed class='diapoExp' src='no' type='application/x-shockwave-flash' width='480' height='350' allowscriptaccess='always' allowfullscreen='true'></embed></object>");
| |
- | $(".diapoExp").attr("src","http://pf.kizoa.com/sflite.swf?did="+jour[newDay].getElementsByTagName('diaporama')[0].getAttribute('did')+"&k="+jour[newDay].getElementsByTagName('diaporama')[0].getAttribute('pk')+"");
| |
- | }
| |
- | else
| |
- | {
| |
- | selectMonth(x[i+1].getAttribute("name"));
| |
- | }
| |
- | }
| |
- | }
| |
- | globalDay=newDay;
| |
- | }
| |
- |
| |
- | function previousDay(month_name,day)
| |
- | {
| |
- | if (day!=0)
| |
- | {
| |
- | $(".textContent").html("");
| |
- | if (window.XMLHttpRequest)
| |
- | {// code for IE7+, Firefox, Chrome, Opera, Safari
| |
- | xmlhttp=new XMLHttpRequest();
| |
- | }
| |
- | else
| |
- | {// code for IE6, IE5
| |
- | xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
| |
- | }
| |
- | xmlhttp.open("GET","https://static.igem.org/mediawiki/2012/f/f5/Journal.txt",false);
| |
- | xmlhttp.send();
| |
- | xmlDoc=xmlhttp.responseXML;
| |
- | var newDay=day-1;
| |
- | var x=xmlDoc.getElementsByTagName("month");
| |
- | for (i=0;i<x.length;i++)
| |
- | {
| |
- | if (x[i].getAttribute("name")==month_name)
| |
- | {
| |
- | var jour=x[i].getElementsByTagName("jour");
| |
- | $(".textContent").append("<div class='titreExp'></div>");
| |
- | $(".titreExp").append(jour[newDay].getElementsByTagName("titre")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append("<div class='dateExp'></div>");
| |
- | $(".dateExp").append(" - " + jour[newDay].getElementsByTagName("date")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append("<div class='descExp'></div>");
| |
- | $(".descExp").append(jour[newDay].getElementsByTagName("description")[0].childNodes[0].nodeValue);
| |
- | $(".textContent").append(" <object width='480' height='350'><param name='allowFullScreen' value='true'></param><param name='allowScriptAccess' value='always'></param> <embed class='diapoExp' src='no' type='application/x-shockwave-flash' width='480' height='350' allowscriptaccess='always' allowfullscreen='true'></embed></object>");
| |
- | $(".diapoExp").attr("src","http://pf.kizoa.com/sflite.swf?did="+jour[newDay].getElementsByTagName('diaporama')[0].getAttribute('did')+"&k="+jour[newDay].getElementsByTagName('diaporama')[0].getAttribute('pk')+"");
| |
- | }
| |
- | }
| |
- | globalDay=newDay;
| |
- | }
| |
- | }
| |
- |
| |
- |
| |
- | </script>
| |
| | | |
| <div id="banniere"> | | <div id="banniere"> |