diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-01-15 13:00:55 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-15 16:30:00 +0000 |
commit | eaae82a19acaf786b866043ea80107f28e8206b2 (patch) | |
tree | 4e5edd8d7f044755ae76ae67bd1d473431448a3c /bitbake/lib/toaster/toastergui/static/js | |
parent | 33b011c1589519db8176c9f5a4abb540698902e6 (diff) | |
download | poky-eaae82a19acaf786b866043ea80107f28e8206b2.tar.gz |
bitbake: toastergui: convert project builds page to ToasterTable
Use the all builds ToasterTable as the basis for the project builds
ToasterTable.
[YOCTO #8738]
(Bitbake rev: 87bcfb740dd2d9944e35a2a1f71cbf8ff3b266e9)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 9 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/table.js | 13 |
2 files changed, 17 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js index b6ad380c19..58a32a056e 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js +++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | |||
@@ -7,7 +7,10 @@ function projectTopBarInit(ctx) { | |||
7 | var projectName = $("#project-name"); | 7 | var projectName = $("#project-name"); |
8 | var projectNameFormToggle = $("#project-change-form-toggle"); | 8 | var projectNameFormToggle = $("#project-change-form-toggle"); |
9 | var projectNameChangeCancel = $("#project-name-change-cancel"); | 9 | var projectNameChangeCancel = $("#project-name-change-cancel"); |
10 | |||
11 | // this doesn't exist for command-line builds | ||
10 | var newBuildTargetInput = $("#build-input"); | 12 | var newBuildTargetInput = $("#build-input"); |
13 | |||
11 | var newBuildTargetBuildBtn = $("#build-button"); | 14 | var newBuildTargetBuildBtn = $("#build-button"); |
12 | var selectedTarget; | 15 | var selectedTarget; |
13 | 16 | ||
@@ -42,6 +45,12 @@ function projectTopBarInit(ctx) { | |||
42 | $(this).parent().removeClass('active'); | 45 | $(this).parent().removeClass('active'); |
43 | }); | 46 | }); |
44 | 47 | ||
48 | if (!newBuildTargetInput.length) { | ||
49 | return; | ||
50 | } | ||
51 | |||
52 | /* the following only applies for non-command-line projects */ | ||
53 | |||
45 | /* Recipe build input functionality */ | 54 | /* Recipe build input functionality */ |
46 | if (ctx.numProjectLayers > 0 && ctx.machine){ | 55 | if (ctx.numProjectLayers > 0 && ctx.machine){ |
47 | newBuildTargetInput.removeAttr("disabled"); | 56 | newBuildTargetInput.removeAttr("disabled"); |
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index afe16b5e1b..7ac4ed5859 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js | |||
@@ -33,6 +33,10 @@ function tableInit(ctx){ | |||
33 | 33 | ||
34 | loadData(tableParams); | 34 | loadData(tableParams); |
35 | 35 | ||
36 | // clicking on this set of elements removes the search | ||
37 | var clearSearchElements = $('.remove-search-btn-'+ctx.tableName + | ||
38 | ', .show-all-'+ctx.tableName); | ||
39 | |||
36 | function loadData(tableParams){ | 40 | function loadData(tableParams){ |
37 | $.ajax({ | 41 | $.ajax({ |
38 | type: "GET", | 42 | type: "GET", |
@@ -62,9 +66,9 @@ function tableInit(ctx){ | |||
62 | paginationBtns.html(""); | 66 | paginationBtns.html(""); |
63 | 67 | ||
64 | if (tableParams.search) | 68 | if (tableParams.search) |
65 | $('.remove-search-btn-'+ctx.tableName).show(); | 69 | clearSearchElements.show(); |
66 | else | 70 | else |
67 | $('.remove-search-btn-'+ctx.tableName).hide(); | 71 | clearSearchElements.hide(); |
68 | 72 | ||
69 | $('.table-count-' + ctx.tableName).text(tableData.total); | 73 | $('.table-count-' + ctx.tableName).text(tableData.total); |
70 | tableTotal = tableData.total; | 74 | tableTotal = tableData.total; |
@@ -230,9 +234,8 @@ function tableInit(ctx){ | |||
230 | 234 | ||
231 | } else { | 235 | } else { |
232 | /* Not orderable */ | 236 | /* Not orderable */ |
233 | header.addClass("muted"); | ||
234 | header.css("font-weight", "normal"); | 237 | header.css("font-weight", "normal"); |
235 | header.append(col.title+' '); | 238 | header.append('<span class="muted">' + col.title + '</span> '); |
236 | } | 239 | } |
237 | 240 | ||
238 | /* Setup the filter button */ | 241 | /* Setup the filter button */ |
@@ -665,7 +668,7 @@ function tableInit(ctx){ | |||
665 | loadData(tableParams); | 668 | loadData(tableParams); |
666 | }); | 669 | }); |
667 | 670 | ||
668 | $('.remove-search-btn-'+ctx.tableName).click(function(e){ | 671 | clearSearchElements.click(function(e){ |
669 | e.preventDefault(); | 672 | e.preventDefault(); |
670 | 673 | ||
671 | tableParams.page = 1; | 674 | tableParams.page = 1; |