Refactoring rubric and rubrics templates
This commit is contained in:
parent
6a28e53167
commit
5cb579fee9
2 changed files with 4 additions and 38 deletions
|
@ -1,6 +1,8 @@
|
|||
<#import "lib-vivo-properties.ftl" as vp>
|
||||
<#include "individual-setup.ftl">
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/themes/iph/js/collapsible_elements.js"></script>')}
|
||||
|
||||
<section id="individual-intro" class="vcard person" role="region">
|
||||
<span itemscope itemtype="http://schema.org/Person">
|
||||
<section id="individual-info" ${infoClass!} role="region" style="width: 100%;">
|
||||
|
@ -109,23 +111,3 @@
|
|||
</#list>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
|
||||
<script>
|
||||
var coll = document.getElementsByClassName("collapsible");
|
||||
var i;
|
||||
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
var content = this.nextElementSibling;
|
||||
if (content.style.display === "block") {
|
||||
content.style.display = "none";
|
||||
} else {
|
||||
content.style.display = "block";
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
${scripts.add('<script type="text/javascript" src="${urls.base}/themes/iph/js/collapsible_elements.js"></script>')}
|
||||
|
||||
<#list rubrics as rubric>
|
||||
<#if !rubric.parentUri??>
|
||||
<#assign childs = rubric.childs?number>
|
||||
|
@ -13,24 +15,6 @@
|
|||
</#list>
|
||||
|
||||
|
||||
<script>
|
||||
var coll = document.getElementsByClassName("collapsible");
|
||||
var i;
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
var content = this.nextElementSibling;
|
||||
if (content.style.display === "block") {
|
||||
content.style.display = "none";
|
||||
$(this).children('.collapsibleSign').text('+');
|
||||
} else {
|
||||
content.style.display = "block";
|
||||
$(this).children('.collapsibleSign').text('–');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<#macro openButton childs>
|
||||
<#if childs > 0>
|
||||
<div class="collapsibleSign" style="display:inline-block;width:10px;">+</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue