Now when the user presses the "+" key all sections will collapse/expand.
Also added a note to the help screen which describes this behavior.
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
+ <dt>+</dt>
+ <dd>Collapse/expand all sections</dd>
+ case "+":
+ toggleAllDocs();
+ break;
+
case "?":
if (ev.shiftKey && $("#help").hasClass("hidden")) {
ev.preventDefault();
case "?":
if (ev.shiftKey && $("#help").hasClass("hidden")) {
ev.preventDefault();
return "\u2212"; // "\u2212" is '−' minus sign
}
return "\u2212"; // "\u2212" is '−' minus sign
}
- $("#toggle-all-docs").on("click", function() {
+ function toggleAllDocs() {
var toggle = $("#toggle-all-docs");
if (toggle.hasClass("will-expand")) {
toggle.removeClass("will-expand");
var toggle = $("#toggle-all-docs");
if (toggle.hasClass("will-expand")) {
toggle.removeClass("will-expand");
$(".toggle-wrapper").addClass("collapsed");
$(".collapse-toggle").children(".inner").text(labelForToggleButton(true));
}
$(".toggle-wrapper").addClass("collapsed");
$(".collapse-toggle").children(".inner").text(labelForToggleButton(true));
}
+ }
+
+ $("#toggle-all-docs").on("click", toggleAllDocs);
$(document).on("click", ".collapse-toggle", function() {
var toggle = $(this);
$(document).on("click", ".collapse-toggle", function() {
var toggle = $(this);
background: #e9e9e9;
box-shadow: 0 0 6px rgba(0,0,0,.2);
width: 550px;
background: #e9e9e9;
box-shadow: 0 0 6px rgba(0,0,0,.2);
width: 550px;
border: 1px solid #bfbfbf;
}
#help dt {
border: 1px solid #bfbfbf;
}
#help dt {