Newer
Older
$(document).ready(function(){
$('.collapsible').collapsible({
accordion : false // A setting that changes the collapsible behavior to expandable instead of the default accordion style
});
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
});
function isNull(object)
{
if(object != "" && object != undefined)
{
return false;
}
else
{
return true;
}
}
function hideElement(element, value)
{
if(value == true)
{
element.classList.add("hide");
}
else
{
if(element.classList.contains("hide"))
{
element.classList.remove("hide");
}
}
}
function fadeIn(element)
{
element.style.opacity = 0;
var op = 0;
var timer = setInterval(function ()
{
if (op >= 0.9){
clearInterval(timer);
element.style.opacity = 1.0;
}
element.style.opacity = op;
op += 0.1;
}, 50);
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
88
89
90
91
92
93
}
function createTrainMap()
{
var entries = document.getElementsByClassName('version-entry');
var lines = document.getElementsByClassName('train-line');
for(var i = 0; i < entries.length - 1; i++)
{
var height = entries[i].offsetHeight - 16;
lines[i].style.height = height + "px";
}
}
function toggleDetail(element)
{
var container = element.parentElement.parentElement.childNodes[3];
var cardHeader = element.parentElement;
if(container.classList.contains("hide"))
{
hideElement(container, false);
fadeIn(container);
if(!cardHeader.classList.contains("margin-bottom"))
{
cardHeader.classList.add("margin-bottom");
}
}
else
{
hideElement(container, true);
if(cardHeader.classList.contains("margin-bottom"))
{
cardHeader.classList.remove("margin-bottom");
}
}