-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
3,147 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
CollapsibleLists.js | ||
An object allowing lists to dynamically expand and collapse | ||
Created by Stephen Morley - http://code.stephenmorley.org/ - and released under | ||
the terms of the CC0 1.0 Universal legal code: | ||
http://creativecommons.org/publicdomain/zero/1.0/legalcode | ||
*/ | ||
|
||
var CollapsibleLists=new function(){ | ||
this.apply=function(_1){ | ||
var _2=document.getElementsByTagName("ul"); | ||
for(var _3=0;_3<_2.length;_3++){ | ||
if(_2[_3].className.match(/(^| )collapsibleList( |$)/)){ | ||
this.applyTo(_2[_3],true); | ||
if(!_1){ | ||
var _4=_2[_3].getElementsByTagName("ul"); | ||
for(var _5=0;_5<_4.length;_5++){ | ||
_4[_5].className+=" collapsibleList"; | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
this.applyTo=function(_6,_7){ | ||
var _8=_6.getElementsByTagName("li"); | ||
for(var _9=0;_9<_8.length;_9++){ | ||
if(!_7||_6==_8[_9].parentNode){ | ||
if(_8[_9].addEventListener){ | ||
_8[_9].addEventListener("mousedown",function(e){ | ||
e.preventDefault(); | ||
},false); | ||
}else{ | ||
_8[_9].attachEvent("onselectstart",function(){ | ||
event.returnValue=false; | ||
}); | ||
} | ||
if(_8[_9].addEventListener){ | ||
_8[_9].addEventListener("click",_a(_8[_9]),false); | ||
}else{ | ||
_8[_9].attachEvent("onclick",_a(_8[_9])); | ||
} | ||
_b(_8[_9]); | ||
} | ||
} | ||
}; | ||
function _a(_c){ | ||
return function(e){ | ||
if(!e){ | ||
e=window.event; | ||
} | ||
var _d=(e.target?e.target:e.srcElement); | ||
while(_d.nodeName!="LI"){ | ||
_d=_d.parentNode; | ||
} | ||
if(_d==_c){ | ||
_b(_c); | ||
} | ||
}; | ||
}; | ||
function _b(_e){ | ||
var _f=_e.className.match(/(^| )collapsibleListClosed( |$)/); | ||
var uls=_e.getElementsByTagName("ul"); | ||
for(var _10=0;_10<uls.length;_10++){ | ||
var li=uls[_10]; | ||
while(li.nodeName!="LI"){ | ||
li=li.parentNode; | ||
} | ||
if(li==_e){ | ||
uls[_10].style.display=(_f?"block":"none"); | ||
} | ||
} | ||
_e.className=_e.className.replace(/(^| )collapsibleList(Open|Closed)( |$)/,""); | ||
if(uls.length>0){ | ||
_e.className+=" collapsibleList"+(_f?"Open":"Closed"); | ||
} | ||
}; | ||
}(); | ||
|
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* Source taken directly from: | ||
* view-source:http://code.stephenmorley.org/javascript/collapsible-lists/ | ||
* | ||
* Stephen Morley's license for this code is CC0: | ||
* http://code.stephenmorley.org/about-this-site/copyright/ | ||
*/ | ||
.treeView{ | ||
-moz-user-select:none; | ||
position:relative; | ||
} | ||
|
||
.treeView ul{ | ||
margin:0 0 0 -1.5em ! important; | ||
padding:0 0 0 1.5em ! important; | ||
} | ||
|
||
.treeView ul ul{ | ||
background:url('list-item-contents.png') repeat-y left ! important; | ||
} | ||
|
||
.treeView li.lastChild > ul{ | ||
background-image:none ! important; | ||
} | ||
|
||
.treeView li{ | ||
margin:0 ! important; | ||
padding:0 ! important; | ||
background:url('list-item-root.png') no-repeat top left ! important; | ||
list-style-position:inside ! important; | ||
list-style-image:url('button.png') ! important; | ||
cursor:auto; | ||
} | ||
|
||
.treeView li.collapsibleListOpen{ | ||
list-style-image:url('button-open.png') ! important; | ||
cursor:pointer; | ||
} | ||
|
||
.treeView li.collapsibleListClosed{ | ||
list-style-image:url('button-closed.png') ! important; | ||
cursor:pointer; | ||
} | ||
|
||
.treeView li li{ | ||
background-image:url('list-item.png') ! important; | ||
padding-left:1.5em ! important; | ||
} | ||
|
||
.treeView li.lastChild{ | ||
background-image:url('list-item-last.png') ! important; | ||
} | ||
|
||
.treeView li.collapsibleListOpen{ | ||
background-image:url('list-item-open.png') ! important; | ||
} | ||
|
||
.treeView li.collapsibleListOpen.lastChild{ | ||
background-image:url('list-item-last-open.png') ! important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# This extends the theme set by conf.py to enable the createTreeView for exhale. #} | ||
{% extends "!layout.html" %} | ||
{% block extrahead %} | ||
<!-- Load in the tree_view css for the view hierarchies. --> | ||
<link href="{{ pathto('_static/collapse/tree_view.css', 1) }}" rel="stylesheet"> | ||
{% endblock %} | ||
{# Load the javascript files last for browsing speed. #} | ||
{% block footer %} | ||
<!-- Collapsible lists javascript for hiearchy views. --> | ||
<script src="{{ pathto('_static/collapse/CollapsibleLists.compressed.js', 1) }}"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
CollapsibleLists.apply(); | ||
}); | ||
</script> | ||
{% endblock %} |
Oops, something went wrong.