Skip to content

Commit

Permalink
Merge pull request #128 from aldebaran/toggle
Browse files Browse the repository at this point in the history
Permit to toggle show of benchmarks and executables in comparison
  • Loading branch information
tobami committed Oct 8, 2012
2 parents 0abcd65 + 46580a4 commit ec36ba7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions codespeed/static/css/main.css
Expand Up @@ -226,6 +226,7 @@ div.about_content { text-align: left; }
.boxbody input { margin-left: 0; vertical-align: top; }
#options li { margin-bottom: 0.8em; }
.seriescolor { float: right; margin-top: 2px; height: 13px; width: 14px; }
a.togglefold { font-size: normal; color: #000000; }
a.checkall, a.uncheckall { font-size: small; color: #AAAAAA; }

p.errormessage { line-height: 10em; margin-bottom: 10em; }
Expand Down
8 changes: 8 additions & 0 deletions codespeed/static/js/codespeed.js
Expand Up @@ -43,4 +43,12 @@ $(function() {
return false;
});
});

$('.togglefold').each(function() {
var lis = $(this).parent().children("li");
$(this).click(function() {
lis.slideToggle();
return false;
});
});
});
4 changes: 2 additions & 2 deletions codespeed/templates/codespeed/comparison.html
Expand Up @@ -28,7 +28,7 @@
<div class="boxhead"><h2>Executables</h2></div>
<div class="boxbody">
{% for proj, executable in executables.items %}
<ul>{{ proj }} <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
<ul><a href="#" class="togglefold">{{ proj }}</a> <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
{% for exe in executable %}
<li title="{{ exe.executable }} - {{ exe.revision }}">
<input id="exe_{{ exe.key }}" type="checkbox" name="executables" value="{{ exe.key }}" />
Expand All @@ -41,7 +41,7 @@
<div class="boxhead"><h2>Benchmarks</h2></div>
<div class="boxbody">
{% for key,benchlist in benchmarks.items %}
<ul>{{ key }} <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
<ul><a href="#" class="togglefold">{{ key }}</a> <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a>
{% for bench in benchlist|dictsort:"name" %}
<li title="{{ bench.description }}">
<input id="benchmark_{{ bench.id }}" type="checkbox" name="benchmarks" value="{{ bench.id }}" />
Expand Down

0 comments on commit ec36ba7

Please sign in to comment.