diff options
Diffstat (limited to 'bitbake/lib/toaster/bldviewer/templates/basetable.html')
-rw-r--r-- | bitbake/lib/toaster/bldviewer/templates/basetable.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldviewer/templates/basetable.html b/bitbake/lib/toaster/bldviewer/templates/basetable.html new file mode 100644 index 0000000000..083bcb82e9 --- /dev/null +++ b/bitbake/lib/toaster/bldviewer/templates/basetable.html | |||
@@ -0,0 +1,46 @@ | |||
1 | {% extends "base.html" %} | ||
2 | |||
3 | {% block pagecontent %} | ||
4 | <script> | ||
5 | function showhideTableColumn(i, sh) { | ||
6 | if (sh) | ||
7 | $('td:nth-child('+i+'),th:nth-child('+i+')').show(); | ||
8 | else | ||
9 | $('td:nth-child('+i+'),th:nth-child('+i+')').hide(); | ||
10 | } | ||
11 | |||
12 | |||
13 | function filterTableRows(test) { | ||
14 | if (test.length > 0) { | ||
15 | var r = test.split(/[ ,]+/).map(function (e) { return new RegExp(e, 'i') }); | ||
16 | $('tr.data').map( function (i, el) { | ||
17 | (! r.map(function (j) { return j.test($(el).html())}).reduce(function (c, p) { return c && p;} )) ? $(el).hide() : $(el).show(); | ||
18 | }); | ||
19 | } else | ||
20 | { | ||
21 | $('tr.data').show(); | ||
22 | } | ||
23 | } | ||
24 | </script> | ||
25 | <div style="margin-bottom: 0.5em"> | ||
26 | |||
27 | {% block pagename %} | ||
28 | {% endblock %} | ||
29 | <div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Search: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off"> | ||
30 | </div> | ||
31 | {% if hideshowcols %} | ||
32 | <div align="right" style="display: inline-block; width: 40%">Show/Hide columns: | ||
33 | {% for i in hideshowcols %} | ||
34 | <span>{{i.name}} <input type="checkbox" id="ct{{i.name}}" onchange="showhideTableColumn({{i.order}}, $('#ct{{i.name}}').is(':checked'))" checked autocomplete="off"></span> | | ||
35 | {% endfor %} | ||
36 | </div> | ||
37 | {% endif %} | ||
38 | </div> | ||
39 | <div> | ||
40 | <table class="table table-striped table-condensed" style="width:95%"> | ||
41 | {% block pagetable %} | ||
42 | {% endblock %} | ||
43 | </table> | ||
44 | </div> | ||
45 | |||
46 | {% endblock %} | ||