aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/resources/html/js-src/init.ts
diff options
context:
space:
mode:
authorTim Baumann <tim@timbaumann.info>2017-10-09 18:33:09 +0200
committerAlexander Biehl <alexbiehl@gmail.com>2017-10-09 18:33:09 +0200
commite41c1cbe9f0476997eac7b4a3f17cbc6b2262faf (patch)
tree630d1956d5c94e7fcbc185027d211c64213597b4 /haddock-api/resources/html/js-src/init.ts
parent406030f2782590799e44470da7ca80e85f3cf026 (diff)
Use <details> element for collapsibles (#690)
* Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes #560.
Diffstat (limited to 'haddock-api/resources/html/js-src/init.ts')
-rw-r--r--haddock-api/resources/html/js-src/init.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/haddock-api/resources/html/js-src/init.ts b/haddock-api/resources/html/js-src/init.ts
index 0619dfc3..877874ae 100644
--- a/haddock-api/resources/html/js-src/init.ts
+++ b/haddock-api/resources/html/js-src/init.ts
@@ -1,4 +1,5 @@
-import * as util from "./haddock-util";
+import * as styleMenu from "./style-menu";
+import * as detailsHelper from "./details-helper";
import * as quickJump from "./quick-jump";
function onDomReady(callback: () => void) {
@@ -14,8 +15,8 @@ function onDomReady(callback: () => void) {
}
onDomReady(() => {
- util.addStyleMenu();
- util.resetStyle();
- util.restoreCollapsed();
+ document.body.classList.add('js-enabled');
+ styleMenu.init();
+ detailsHelper.init();
quickJump.init();
}); \ No newline at end of file