diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/doc/html/dynsections.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/doc/html/dynsections.js b/libraries/irrlicht-1.8/doc/html/dynsections.js new file mode 100644 index 0000000..bf14807 --- /dev/null +++ b/libraries/irrlicht-1.8/doc/html/dynsections.js | |||
@@ -0,0 +1,42 @@ | |||
1 | var showTriggers = new Array(); | ||
2 | |||
3 | function registerShow(sectId,showFunc) { | ||
4 | showTriggers[sectId] = showFunc; | ||
5 | } | ||
6 | |||
7 | function hasClass(ele,cls) { | ||
8 | return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); | ||
9 | } | ||
10 | |||
11 | function addClass(ele,cls) { | ||
12 | if (!this.hasClass(ele,cls)) ele.className += " "+cls; | ||
13 | } | ||
14 | |||
15 | function removeClass(ele,cls) { | ||
16 | if (hasClass(ele,cls)) { | ||
17 | var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); | ||
18 | ele.className=ele.className.replace(reg,' '); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | function toggleVisibility(linkObj) { | ||
23 | var base = linkObj.getAttribute('id'); | ||
24 | var summary = document.getElementById(base + '-summary'); | ||
25 | var content = document.getElementById(base + '-content'); | ||
26 | var trigger = document.getElementById(base + '-trigger'); | ||
27 | if ( hasClass(linkObj,'closed') ) { | ||
28 | summary.style.display = 'none'; | ||
29 | content.style.display = 'block'; | ||
30 | trigger.src = trigger.src.substring(0,trigger.src.length-10)+'open.png'; | ||
31 | removeClass(linkObj,'closed'); | ||
32 | addClass(linkObj,'opened'); | ||
33 | if (showTriggers[base]) { showTriggers[base](); } | ||
34 | } else if ( hasClass(linkObj,'opened') ) { | ||
35 | summary.style.display = 'block'; | ||
36 | content.style.display = 'none'; | ||
37 | trigger.src = trigger.src.substring(0,trigger.src.length-8)+'closed.png'; | ||
38 | removeClass(linkObj,'opened'); | ||
39 | addClass(linkObj,'closed'); | ||
40 | } | ||
41 | return false; | ||
42 | } | ||