Skip to content

Commit ec36ba7

Browse files
committed
Merge pull request tobami#128 from aldebaran/toggle
Permit to toggle show of benchmarks and executables in comparison
2 parents 0abcd65 + 46580a4 commit ec36ba7

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

codespeed/static/css/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ div.about_content { text-align: left; }
226226
.boxbody input { margin-left: 0; vertical-align: top; }
227227
#options li { margin-bottom: 0.8em; }
228228
.seriescolor { float: right; margin-top: 2px; height: 13px; width: 14px; }
229+
a.togglefold { font-size: normal; color: #000000; }
229230
a.checkall, a.uncheckall { font-size: small; color: #AAAAAA; }
230231

231232
p.errormessage { line-height: 10em; margin-bottom: 10em; }

codespeed/static/js/codespeed.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,12 @@ $(function() {
4343
return false;
4444
});
4545
});
46+
47+
$('.togglefold').each(function() {
48+
var lis = $(this).parent().children("li");
49+
$(this).click(function() {
50+
lis.slideToggle();
51+
return false;
52+
});
53+
});
4654
});

codespeed/templates/codespeed/comparison.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<div class="boxhead"><h2>Executables</h2></div>
2929
<div class="boxbody">
3030
{% for proj, executable in executables.items %}
31-
<ul>{{ proj }} <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
31+
<ul><a href="#" class="togglefold">{{ proj }}</a> <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
3232
{% for exe in executable %}
3333
<li title="{{ exe.executable }} - {{ exe.revision }}">
3434
<input id="exe_{{ exe.key }}" type="checkbox" name="executables" value="{{ exe.key }}" />
@@ -41,7 +41,7 @@
4141
<div class="boxhead"><h2>Benchmarks</h2></div>
4242
<div class="boxbody">
4343
{% for key,benchlist in benchmarks.items %}
44-
<ul>{{ key }} <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
44+
<ul><a href="#" class="togglefold">{{ key }}</a> <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
4545
{% for bench in benchlist|dictsort:"name" %}
4646
<li title="{{ bench.description }}">
4747
<input id="benchmark_{{ bench.id }}" type="checkbox" name="benchmarks" value="{{ bench.id }}" />

0 commit comments

Comments
 (0)