[LNT] r209019 - Add select all checkbox for report tables
Yi Kong
Yi.Kong at arm.com
Fri May 16 13:52:58 PDT 2014
Author: kongyi
Date: Fri May 16 15:52:58 2014
New Revision: 209019
URL: http://llvm.org/viewvc/llvm-project?rev=209019&view=rev
Log:
Add select all checkbox for report tables
Modified:
lnt/trunk/lnt/server/ui/templates/v4_run.html
Modified: lnt/trunk/lnt/server/ui/templates/v4_run.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_run.html?rev=209019&r1=209018&r2=209019&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html Fri May 16 15:52:58 2014
@@ -16,6 +16,20 @@
{% block head %}
<script src="{{ url_for('.static', filename='popup.js') }}"></script>
<script src="{{ url_for('.static', filename='sorttable.js') }}"></script>
+ <script type="text/javascript">
+ function getClosestTable(el) {
+ while (el.nodeName !== "TABLE") {
+ el = el.parentNode;
+ }
+ return el;
+ }
+
+ function selectAll(source) {
+ checkboxes = getClosestTable(source).getElementsByTagName('input');
+ for(var i in checkboxes)
+ checkboxes[i].checked = source.checked;
+ }
+ </script>
{% endblock %}
{% block title %}Run Results{% endblock %}
@@ -289,7 +303,7 @@
<table class="table table-striped table-hover table-condensed">
<thead>
<tr>
- <th rowspan="1"></th>
+ <th rowspan="1"><input type="checkbox" id="select-all" onClick="selectAll(this)"></th>
<th rowspan="1">Name</th>
{% if options.show_previous %}<th>Prev</th>{% endif %}
<th>Current</th>
More information about the llvm-commits
mailing list