summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/basetable_top.html
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-12-11 16:42:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:20:25 +0000
commit2251426ae420640c082ec0d0109b9be435075411 (patch)
tree0f58f48d18bbfd9054c928f3ef554365f74d6ed8 /bitbake/lib/toaster/toastergui/templates/basetable_top.html
parentc2fc6ca2fa68aca17235cac306b6df4b882fe9ff (diff)
downloadpoky-2251426ae420640c082ec0d0109b9be435075411.tar.gz
bitbake: toaster: Create the base page navigation structure
Updating the general container pages to use the graphical design and features from the design phase. In the process of adapting the Simple UI to the designed interface, we create all the pages and the navigation structure for the Toaster GUI. Views for each page have been added, and the url mapping has been updated to reflect newly added pages. The table page has been refactored to be component-oriented instead of class-oriented in order to facilitate reusage. Changes are made in different layers of the template (base, basetable) in order to maximize code reuse among different pages in the build. (Bitbake rev: d31f039ae31b77023722c06e66542751536a1362) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/basetable_top.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top.html66
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