-
Notifications
You must be signed in to change notification settings - Fork 1
/
changelog.js
87 lines (85 loc) · 2.31 KB
/
changelog.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
function dropdowns() {
var divs = document.getElementsByTagName('div');
var headers = new Array();
var links = new Array();
for(var i=0;i<divs.length;i++){
if(divs[i].className=='drop') {
divs[i].className='drop closed';
headers.push(divs[i]);
}
if(divs[i].className=='indrop') {
divs[i].className='indrop hidden';
links.push(divs[i]);
}
}
for(var i=0;i<headers.length;i++){
if(typeof(links[i])!== 'undefined' && links[i]!=null) {
headers[i].onclick = (function(elem) {
return function() {
if(elem.className.search('visible')>=0) {
elem.className = elem.className.replace('visible','hidden');
this.className = this.className.replace('open','closed');
}
else {
elem.className = elem.className.replace('hidden','visible');
this.className = this.className.replace('closed','open');
}
return false;
}
})(links[i]);
}
}
}
*/
/*
function filterchanges(type){
var lists = document.getElementsByTagName('ul');
for(var i in lists){
if(lists[i].className && lists[i].className.search('changes')>=0) {
for(var j in lists[i].childNodes){
if(lists[i].childNodes[j].nodeType == 1){
if(!type){
lists[i].childNodes[j].style.display = 'block';
}
else if(lists[i].childNodes[j].className!=type) {
lists[i].childNodes[j].style.display = 'none';
}
else {
lists[i].childNodes[j].style.display = 'block';
}
}
}
}
}
}
*/
function dropdowns() {
var drops = $('div.drop');
var indrops = $('div.indrop');
if(drops.length!=indrops.length){
alert("Some coder fucked up with dropdowns");
}
drops.each(function(index){
$(this).toggleClass('closed');
$(indrops[index]).hide();
$(this).click(function(){
$(this).toggleClass('closed');
$(this).toggleClass('open');
$(indrops[index]).toggle();
});
});
}
function filterchanges(type){
$('ul.changes li').each(function(){
if(!type || $(this).hasClass(type)){
$(this).show();
}
else {
$(this).hide();
}
});
}
$(document).ready(function(){
dropdowns();
});