Team:TU Delft/test

From 2010.igem.org

(Difference between revisions)
 
(16 intermediate revisions not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
<html>
<html>
-
<style>
 
-
table {
 
-
margin: 0;
 
-
padding: 0;
 
-
font-size: 11px;
 
-
border: 1px solid #000;
 
-
}
 
-
table td {
 
-
padding: 5px;
 
-
}
 
-
table .head {
 
-
background-color: #216085 ;
 
-
font-weight: bold;
 
-
color: #fff;
 
-
}
 
-
table .odd {
 
-
background-color: #d0f1fa;
 
-
}
 
-
</style>
 
<!--
<!--
Line 79: Line 60:
// $("#iGEM_TU_Delft_container").html('<iframe src="'+url+'" width="100%" height="100%"></iframe>');
// $("#iGEM_TU_Delft_container").html('<iframe src="'+url+'" width="100%" height="100%"></iframe>');
// });
// });
 +
}
}
Line 136: Line 118:
function include_js(file, cb) {
function include_js(file, cb) {
-
    var html_doc = document.getElementsByTagName('head')[0];
+
var html_doc = document.getElementsByTagName('head')[0];
-
    var js = document.createElement('script');
+
var js = document.createElement('script');
-
    js.setAttribute('type', 'text/javascript');
+
js.setAttribute('type', 'text/javascript');
-
    js.setAttribute('src', file);
+
js.setAttribute('src', file);
-
    html_doc.appendChild(js);
+
html_doc.appendChild(js);
-
    js.onreadystatechange = function () {
+
js.onreadystatechange = function () {
-
        if (js.readyState == 'complete') {
+
if (js.readyState == 'complete')
-
cb();
+
cb();
-
        }
+
}
-
    }
+
-
    js.onload = cb;
+
js.onload = cb;
}
}
Line 156: Line 137:
}
}
-
function loadPage(page)
+
 
 +
function moveToAnchor(anchor) {
 +
try {
 +
var pos = $('#iGEM_TU_Delft_container > a[name='+anchor+']').offset();
 +
dbgout('anchor: '+anchor+';  pos=' + pos.left + ','+pos.top );
 +
window.scroll(pos.left, pos.top);
 +
} catch (err) {
 +
dbgout('moveToAnchor error: ' + err);
 +
}
 +
}
 +
 
 +
 
 +
function loadPage(page, anchor)
{
{
var showLoadAnim = !!currentPage;
var showLoadAnim = !!currentPage;
currentPage = page;
currentPage = page;
var url = wgServer + "/Team:TU_Delft/" + page + "?action=render";
var url = wgServer + "/Team:TU_Delft/" + page + "?action=render";
 +
if(page.substring(0, 5) == "User:") {
 +
url = wgServer + "/" + page + "?action=render";
 +
}
$(window).trigger('page_close');
$(window).trigger('page_close');
Line 175: Line 171:
$(window).trigger('page_init');
$(window).trigger('page_init');
rewriteLinks($("#iGEM_TU_Delft_container"));
rewriteLinks($("#iGEM_TU_Delft_container"));
 +
if (anchor) moveToAnchor(anchor);
updateContentEditLink();
updateContentEditLink();
$("#iGEM_TU_Delft_container").fadeTo(200,1);
$("#iGEM_TU_Delft_container").fadeTo(200,1);
Line 205: Line 202:
if (changepage) {
if (changepage) {
-
loadPage(changepage);
+
loadPage(changepage, kvmap.anchor);
-
} else
+
} else {
 +
if(kvmap.anchor) moveToAnchor(kvmap.anchor);
$(window).trigger('hashupdate');
$(window).trigger('hashupdate');
 +
}
}
}
} else {
} else {
Line 213: Line 212:
}
}
}
}
-
 
function rewriteLinks(elem) {
function rewriteLinks(elem) {
Line 220: Line 218:
var url = this.href;
var url = this.href;
-
if(this.hash)
+
if(this.hash) {
-
this.href = this.hash;
+
var anchor = this.hash.substring(1);
-
else if(txt != "edit")
+
 
 +
if (anchor.substring(0,5)!='page=')
 +
this.href = '#page=' + currentPage + ampersandStr + 'anchor=' + anchor;
 +
} else if(txt != "edit")
this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page=");
this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page=");
-
// dbgout('rewriting ' + url + ' to ' + this.href);
+
// dbgout('rewriting ' + url + ' to ' + this.href);
});
});
}
}
Line 292: Line 293:
for (count=0;count<(constituentFolders.length);count++)
for (count=0;count<(constituentFolders.length);count++)
{
{
 +
if(constituentFolders[count].substring(0, 5) == "User:") {
 +
outputStr = outputStr + " <span class='doubleright'>&raquo;</span> <a href='https://2010.igem.org/Team:TU_Delft#page=Team/'>Team</a> <span class='doubleright'>&raquo;</span> <a href='https://2010.igem.org/Team:TU_Delft#page=Team/members'>Members</a> <span class='doubleright'>&raquo;</span> <a href='https://2010.igem.org/Team:TU_Delft#page=" + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ").substring(5) + "</a>";
 +
}
 +
if(constituentFolders[count].substring(0, 5) !== "User:") {
outputStr=outputStr + " <span class='doubleright'>&raquo;</span> <a href='https://2010.igem.org/Team:TU_Delft#page=" + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
outputStr=outputStr + " <span class='doubleright'>&raquo;</span> <a href='https://2010.igem.org/Team:TU_Delft#page=" + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
 +
}
}
}
}
}
Line 342: Line 348:
h1{border:none; width: 100%; clear: both;}
h1{border:none; width: 100%; clear: both;}
/* Wiki Hacks - END */
/* Wiki Hacks - END */
 +
 +
table {
 +
margin: 0;
 +
padding: 0;
 +
font-size: 11px;
 +
border: 1px solid #000;
 +
}
 +
table td {
 +
padding: 5px;
 +
}
 +
table .head {
 +
background-color: #216085 ;
 +
font-weight: bold;
 +
color: #fff;
 +
}
 +
table .odd {
 +
background-color: #d0f1fa;
 +
}
 +
h2 {
h2 {
font-size: 30px;
font-size: 30px;
Line 364: Line 389:
font-size: 12px;
font-size: 12px;
color: #222222;
color: #222222;
 +
min-width: 1050px;
}
}
Line 628: Line 654:
<ul id="navlist">
<ul id="navlist">
-
<li><a class="menubutton" id="home" href="https://2010.igem.org/Team:TU_Delft#page=Home" title="Home"><span>Home</span></a></li>
+
<li><a class="menubutton" id="home" href="https://2010.igem.org/Team:TU_Delft/Home" title="Home"><span>Home</span></a></li>
-
<li><a class="menubutton" id="team" href="https://2010.igem.org/Team:TU_Delft#page=Team" title="Team"><span>Team</span></a>
+
<li><a class="menubutton" id="team" href="https://2010.igem.org/Team:TU_Delft/Team" title="Team"><span>Team</span></a>
<ul>
<ul>
Line 687: Line 713:
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Safety" title="Overview">Overview</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Safety" title="Overview">Overview</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Safety/in-the-lab" title="Biosafety">Biosafety in the lab</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Safety/in-the-lab" title="Biosafety">Biosafety in the lab</a></li>
-
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Safety/society" title="Safety for Society">Safety for Society</a></li>
 
</ul>
</ul>
</li>
</li>
Line 697: Line 722:
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Perception" title="Perception">Perception</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Perception" title="Perception">Perception</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Awareness" title="Awareness">Awareness</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Awareness" title="Awareness">Awareness</a></li>
 +
</ul>
 +
</li>
 +
<li><a class="menubutton" id="education" href="https://2010.igem.org/Team:TU_Delft#page=Education" title="Education">Education</a>
 +
<ul>
 +
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Education" title="Overview">Overview</a></li>
 +
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Education/science-museum" title="Science Museum">Science Museum</a></li>
 +
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Education/game" title="Game">iGEM Game</a></li>
 +
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Education/Workshop_on_synthetic_biology" title="SynBio Workshop">SynBio Workshop</a></li>
 +
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Education/nemo" title="Night of the Nerds">Night of the Nerds</a></li>
</ul>
</ul>
</li>
</li>
Line 703: Line 737:
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity" title="Overview">Overview</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity" title="Overview">Overview</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity/communication_plan" title="Communication Plan">Communication Plan</a></li>
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity/communication_plan" title="Communication Plan">Communication Plan</a></li>
-
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity/in-the-news" title="In The News">In the News</a></li>
+
<li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity/in-the-news" title="In The News">In the Media</a></li>
<!-- <li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity/articles" title="Articles">Articles</a></li> /-->
<!-- <li><a href="https://2010.igem.org/Team:TU_Delft#page=Publicity/articles" title="Articles">Articles</a></li> /-->
</ul>
</ul>

Latest revision as of 20:56, 26 October 2010