In [-] doc buttons, change hyphen ‘-’ to minus ‘−’

The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.
This commit is contained in:
Rory O’Kane
2015-04-24 20:29:28 -04:00
parent f9e53c7f2c
commit 4ade7080c3

View File

@@ -808,7 +808,7 @@
$("#toggle-all-docs").on("click", function() { $("#toggle-all-docs").on("click", function() {
var toggle = $("#toggle-all-docs"); var toggle = $("#toggle-all-docs");
if (toggle.html() == "[-]") { if (toggle.html() == "[]") {
toggle.html("[+]"); toggle.html("[+]");
toggle.attr("title", "expand all docs"); toggle.attr("title", "expand all docs");
$(".docblock").hide(); $(".docblock").hide();
@@ -816,12 +816,12 @@
$(".toggle-wrapper").addClass("collapsed"); $(".toggle-wrapper").addClass("collapsed");
$(".collapse-toggle").children(".inner").html("+"); $(".collapse-toggle").children(".inner").html("+");
} else { } else {
toggle.html("[-]"); toggle.html("[]");
toggle.attr("title", "collapse all docs"); toggle.attr("title", "collapse all docs");
$(".docblock").show(); $(".docblock").show();
$(".toggle-label").hide(); $(".toggle-label").hide();
$(".toggle-wrapper").removeClass("collapsed"); $(".toggle-wrapper").removeClass("collapsed");
$(".collapse-toggle").children(".inner").html("-"); $(".collapse-toggle").children(".inner").html("");
} }
}); });
@@ -840,7 +840,7 @@
} else { } else {
relatedDoc.slideDown({duration:'fast', easing:'linear'}); relatedDoc.slideDown({duration:'fast', easing:'linear'});
toggle.parent(".toggle-wrapper").removeClass("collapsed"); toggle.parent(".toggle-wrapper").removeClass("collapsed");
toggle.children(".inner").html("-"); toggle.children(".inner").html("");
toggle.children(".toggle-label").hide(); toggle.children(".toggle-label").hide();
} }
} }
@@ -848,7 +848,7 @@
$(function() { $(function() {
var toggle = $("<a/>", {'href': 'javascript:void(0)', 'class': 'collapse-toggle'}) var toggle = $("<a/>", {'href': 'javascript:void(0)', 'class': 'collapse-toggle'})
.html("[<span class='inner'>-</span>]"); .html("[<span class='inner'></span>]");
$(".method").each(function() { $(".method").each(function() {
if ($(this).next().is(".docblock") || if ($(this).next().is(".docblock") ||