Skip to content

Commit 16c3114

Browse files
Jay Bryantmminella
authored andcommitted
Fixed a refresh bug in the document toggle
While working on another feature, I noticed that the document toggle wasn't updating the ToC. I fixed that. (It matters only in the case where entire headings are toggled, but we do have one such case.)
1 parent 1cd4ccb commit 16c3114

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-batch-docs/asciidoc/jsfiles/DocumentToggle.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ $(document).ready(function(){
3737
$("*.javaContent > *").addClass("js-toc-ignore");
3838
$("*.xmlContent > *").removeClass("js-toc-ignore");
3939
window.dispatchEvent(new Event("tocRefresh"));
40+
tocbot.refresh();
4041
Cookies.set('docToggle', 'xml', { expires: 3652 });
4142
};
4243

@@ -46,6 +47,7 @@ $(document).ready(function(){
4647
$("*.xmlContent > *").addClass("js-toc-ignore");
4748
$("*.javaContent > *").removeClass("js-toc-ignore");
4849
window.dispatchEvent(new Event("tocRefresh"));
50+
tocbot.refresh();
4951
Cookies.set('docToggle', 'java', { expires: 3652 });
5052
};
5153

@@ -55,6 +57,7 @@ $(document).ready(function(){
5557
$("*.javaContent > *").removeClass("js-toc-ignore");
5658
$("*.xmlContent > *").removeClass("js-toc-ignore");
5759
window.dispatchEvent(new Event("tocRefresh"));
60+
tocbot.refresh();
5861
Cookies.set('docToggle', 'both', { expires: 3652 });
5962
};
6063

0 commit comments

Comments
 (0)