|
305 | 305 | .attr('checked', true); |
306 | 306 |
|
307 | 307 | //Add color legend to executable list |
308 | | - $("#executable div.boxbody > ul > li > input").each(function() { |
| 308 | + $("#executable div.boxbody > ul > ul > li > input").each(function() { |
309 | 309 | var colorid = $(this).attr("id").slice(10); |
310 | 310 | $(this).parent().find("div.seriescolor").css("background-color", seriesColors[colorid-1]); |
311 | 311 | }); |
|
339 | 339 |
|
340 | 340 | // Init and change handlers are set to the refreshContent handler |
341 | 341 | $.address.init(initializeSite).change(refreshSite); |
| 342 | + |
| 343 | + // Check all and none links |
| 344 | + $('.checkall').click(function() { |
| 345 | + $(this).parent().children("li").children("input").each(function() { |
| 346 | + $(this).attr('checked', true); |
| 347 | + }); |
| 348 | + refreshContent(); |
| 349 | + return false; |
| 350 | + }); |
| 351 | + |
| 352 | + $('.uncheckall').click(function() { |
| 353 | + $(this).parent().children("li").children("input").each(function() { |
| 354 | + $(this).attr('checked', false); |
| 355 | + }); |
| 356 | + refreshContent(); |
| 357 | + return false; |
| 358 | + }); |
342 | 359 | }); |
343 | 360 | </script> |
344 | 361 | {% endblock %} |
|
366 | 383 | <div id="executable" class="sidebox"> |
367 | 384 | <div class="boxhead"><h2>Executables</h2></div> |
368 | 385 | <div class="boxbody"> |
369 | | - <ul class="clearfix">{% for exec in executables|dictsort:"id" %} |
370 | | - <li title="{{ exec.description }}"><!-- the input id != value. It is used for exeutable color order --> |
371 | | - <input id="executable{{ forloop.counter }}" type="checkbox" name="executable" value="{{ exec.id }}" /> |
372 | | - <label for="executable{{ forloop.counter }}">{{ exec }}</label><div class="seriescolor"></div> |
373 | | - </li>{% endfor %} |
374 | | - </ul> |
| 386 | + <ul class="clearfix">{% for proj, execs in executables.items %} |
| 387 | + <ul>{{ proj }} <a href="#" class="checkall">(All</a>, <a href="#" class="uncheckall">None)</a> |
| 388 | + {% for exec in execs|dictsort:"name" %} |
| 389 | + <li title="{{ exec.description }}"><!-- the input id != value. It is used for exeutable color order --> |
| 390 | + <input id="executable{{ exec.id }}" type="checkbox" name="executable" value="{{ exec.id }}" /> |
| 391 | + <label for="executable{{ exec.id }}">{{ exec }}</label><div class="seriescolor"></div> |
| 392 | + </li>{% endfor %} |
| 393 | + </ul> |
| 394 | + {% endfor %} |
375 | 395 | <ul> |
376 | 396 | <li title="Select baseline">Baseline:<div id="baselinecolor" class="seriescolor"></div><br/> |
377 | 397 | <select id="baseline"> |
|
0 commit comments