diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/basetable_top.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basetable_top.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html new file mode 100644 index 0000000000..b9277b4a3d --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | <!-- component to display a generic table --> | ||
| 2 | <script> | ||
| 3 | function showhideTableColumn(clname, sh) { | ||
| 4 | if (sh) $('.' + clname).show(); | ||
| 5 | else $('.' + clname).hide(); | ||
| 6 | } | ||
| 7 | |||
| 8 | |||
| 9 | function filterTableRows(test) { | ||
| 10 | if (test.length > 0) { | ||
| 11 | var r = test.split(/[ ,]+/).map(function (e) { return new RegExp(e, 'i') }); | ||
| 12 | $('tr.data').map( function (i, el) { | ||
| 13 | (! r.map(function (j) { return j.test($(el).html())}).reduce(function (c, p) { return c && p;} )) ? $(el).hide() : $(el).show(); | ||
| 14 | }); | ||
| 15 | } else | ||
| 16 | { | ||
| 17 | $('tr.data').show(); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | </script> | ||
| 21 | |||
| 22 | <!-- control header --> | ||
| 23 | <div class="navbar"> | ||
| 24 | <div class="navbar-inner"> | ||
| 25 | <form class="navbar-search input-append pull-left"> | ||
| 26 | <input class="input-xxlarge" type="text" placeholder="Search {{objectname}}" /> | ||
| 27 | <button class="btn" type="button">Search</button> | ||
| 28 | </form> | ||
| 29 | <div class="pull-right"> | ||
| 30 | |||
| 31 | {% if tablecols %} | ||
| 32 | <div class="btn-group"> | ||
| 33 | <button class="btn dropdown-toggle" data-toggle="dropdown"> | ||
| 34 | Edit columns | ||
| 35 | <span class="caret"></span> | ||
| 36 | </button> | ||
| 37 | <ul class="dropdown-menu"> | ||
| 38 | |||
| 39 | {% for i in tablecols %} | ||
| 40 | <li> | ||
| 41 | <label class="checkbox"> | ||
| 42 | <input type="checkbox" class="chbxtoggle" id="{{i.clclass}}" value="ct{{i.name}}" {% if i.clclass %}{% if not i.hidden %}checked="checked"{%endif%} onchange="showhideTableColumn($(this).attr('id'), $(this).is(':checked'))" {%else%} disabled{% endif %}/> {{i.name}} | ||
| 43 | </label> | ||
| 44 | </li> | ||
| 45 | {% endfor %} | ||
| 46 | </ul> | ||
| 47 | </div> | ||
| 48 | {% endif %} | ||
| 49 | |||
| 50 | <div style="display:inline"> | ||
| 51 | <span class="divider-vertical"></span> | ||
| 52 | <span class="help-inline" style="padding-top:5px;">Show rows:</span> | ||
| 53 | <select style="margin-top:5px;margin-bottom:0px;" class="pagesize"> | ||
| 54 | {% with "2 5 10 25 50 100" as list%} | ||
| 55 | {% for i in list.split %}<option{%if i == request.GET.count %} selected{%endif%}>{{i}}</option> | ||
| 56 | {% endfor %} | ||
| 57 | {% endwith %} | ||
| 58 | </select> | ||
| 59 | </div> | ||
| 60 | </div> | ||
| 61 | </div> | ||
| 62 | </div> | ||
| 63 | |||
| 64 | <!-- the actual rows of the table --> | ||
| 65 | <table class="table table-bordered table-hover tablesorter" id="otable"> | ||
| 66 | |||
