Difference between revisions of "Template:Groningen"

Line 128: Line 128:
  
 
function collapsers(hlvl){
 
function collapsers(hlvl){
var secs = $('.collapse'+ (hlvl ? '-' + hlvl : '')),
+
var secs = $('.collapse'+ (hlvl ? '-' + hlvl : ''));
actual = [];
+
 
 
 
function hideOne(h, sec){
 
function hideOne(h, sec){
Line 147: Line 146:
 
h.parents('collapsible').each(function(){
 
h.parents('collapsible').each(function(){
 
var sec = $(this), h = $('#'+sec.data('the-h'));
 
var sec = $(this), h = $('#'+sec.data('the-h'));
console.log(h, sec);
 
 
 
 
showOne(h, sec);
 
showOne(h, sec);
Line 206: Line 204:
 
sec.data('the-h', hid);
 
sec.data('the-h', hid);
 
h.data('the-sec', secid);
 
h.data('the-sec', secid);
actual.push({sec: sec, h: h});
+
collapsers.all.push({sec: sec, h: h});
 
 
 
if(!id || window.location.hash !== '#' + id){
 
if(!id || window.location.hash !== '#' + id){
Line 214: Line 212:
 
 
 
function toggleAll(){
 
function toggleAll(){
actual.forEach(function(act){
+
collapsers.all.forEach(function(act){
 
 
 
});
 
});
 
}
 
}
+
}
console.log(actual);
+
collapsers.allowConditional = false;
 +
collapsers.allow = [];
 +
collapsers.all = [];
 +
collapsers.nextId = 0;
 +
 
 +
function postcollapse(){
 +
if(collapsers.all.length){
 +
var wrap = $('#ayoop-wrapper'),
 +
btn = $('<a href="#" id="collapser-all">⊖</a>');
 +
 +
wrap.prepend(btn);
 +
btn.click(toggleAll);
 +
}
 
 
 
if(window.location.hash.length > 1){
 
if(window.location.hash.length > 1){
Line 237: Line 247:
 
showOne(h, sec);
 
showOne(h, sec);
 
}
 
}
}
 
 
if(actual.length){
 
var wrap = $('#ayoop-wrapper'),
 
btn = $('<a href="#" id="collapser-all">⊖</a>');
 
 
wrap.prepend(btn);
 
btn.click(toggleAll);
 
 
}
 
}
 
}
 
}
collapsers.allowConditional = false;
 
collapsers.allow = [];
 
collapsers.all = [];
 
collapsers.nextId = 0;
 
  
 
function memberate(){
 
function memberate(){
Line 393: Line 391:
 
collapsers('h3');
 
collapsers('h3');
 
collapsers('h4');
 
collapsers('h4');
 +
postcollapse();
 
memberate();
 
memberate();
 
cyclers();
 
cyclers();

Revision as of 14:16, 17 October 2016

CryptoGE®M
Team
Project
Biology
Computing
Human Practice
Acknowledgements