summaryrefslogtreecommitdiff
path: root/distribution/osx/gtk-bundle/toc.js
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-04-29 12:11:35 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-04-29 12:11:35 +0200
commitdcef13a23c06398c0c9b3145c08b28d1110bc169 (patch)
treedf8d3227b3d71fdd356b3c1e69c62533d1759f72 /distribution/osx/gtk-bundle/toc.js
parent3e11d9c0e6173fce8a482efed8d7f965e8bd6dfa (diff)
parent16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff)
Merge tag 'upstream/4.3.0'
Upstream version 4.3.0
Diffstat (limited to 'distribution/osx/gtk-bundle/toc.js')
-rw-r--r--distribution/osx/gtk-bundle/toc.js67
1 files changed, 67 insertions, 0 deletions
diff --git a/distribution/osx/gtk-bundle/toc.js b/distribution/osx/gtk-bundle/toc.js
new file mode 100644
index 0000000..4767236
--- /dev/null
+++ b/distribution/osx/gtk-bundle/toc.js
@@ -0,0 +1,67 @@
+<!-- Start of script to import html into div, toggle TOC button
+
+ // If in HelpViewer activate the TOC display button.
+ if ('HelpViewer' in window && 'showTOCButton' in window.HelpViewer) {
+ function toggle() {
+ var e = document.getElementById('toc');
+ if (e.style.display == 'block' || e.style.display=='')
+ {
+ e.style.display = 'none';
+ }
+ else
+ {
+ e.style.display = 'block';
+ }
+ }
+
+ function showTOCButton(state) {
+ window.HelpViewer.showTOCButton(state, toggle, toggle);
+ window.HelpViewer.setTOCButton(state);
+ }
+ window.setTimeout(showTOCButton(true), 1000);
+
+ }
+ window.onload=function() {
+ function include(a,b){
+ var c="/^(?:file):/"
+ var d=new XMLHttpRequest;
+ var e=0;
+ try {
+ d.open('GET',b,!0);
+ d.onreadystatechange=function(){
+ if (4==d.readyState) a.innerHTML=d.responseText;
+ var acc = document.getElementsByClassName("accordion");
+ var i;
+
+ for (i = 0; i < acc.length; i++) {
+ acc[i].onclick = function() {
+ var panels = document.getElementsByClassName("accordion");
+ this.classList.toggle("active");
+ var panel = this.parentElement.nextElementSibling;
+ if (panel.tagName == "DIV") {
+ if (panel.style.maxHeight){
+ panel.style.maxHeight = null;
+ } else {
+ panel.style.maxHeight = panel.scrollHeight + "px";
+ }
+ }
+ }
+ }
+ }
+ d.send();
+ } catch(f){};
+ }
+
+ var c=document.getElementsByTagName('DIV');
+ var i;
+ for(i = 0; i < c.length; i++) {
+ if (c[i].hasAttribute && c[i].hasAttribute('data-include')) {
+ include(c[i],c[i].getAttribute('data-include'));
+ };
+ }
+
+ }
+
+
+
+// End -->