mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 12:49:34 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
33b011c158
commit
eaae82a19a
@@ -7,7 +7,10 @@ function projectTopBarInit(ctx) {
|
||||
var projectName = $("#project-name");
|
||||
var projectNameFormToggle = $("#project-change-form-toggle");
|
||||
var projectNameChangeCancel = $("#project-name-change-cancel");
|
||||
|
||||
// this doesn't exist for command-line builds
|
||||
var newBuildTargetInput = $("#build-input");
|
||||
|
||||
var newBuildTargetBuildBtn = $("#build-button");
|
||||
var selectedTarget;
|
||||
|
||||
@@ -42,6 +45,12 @@ function projectTopBarInit(ctx) {
|
||||
$(this).parent().removeClass('active');
|
||||
});
|
||||
|
||||
if (!newBuildTargetInput.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* the following only applies for non-command-line projects */
|
||||
|
||||
/* Recipe build input functionality */
|
||||
if (ctx.numProjectLayers > 0 && ctx.machine){
|
||||
newBuildTargetInput.removeAttr("disabled");
|
||||
|
||||
@@ -33,6 +33,10 @@ function tableInit(ctx){
|
||||
|
||||
loadData(tableParams);
|
||||
|
||||
// clicking on this set of elements removes the search
|
||||
var clearSearchElements = $('.remove-search-btn-'+ctx.tableName +
|
||||
', .show-all-'+ctx.tableName);
|
||||
|
||||
function loadData(tableParams){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
@@ -62,9 +66,9 @@ function tableInit(ctx){
|
||||
paginationBtns.html("");
|
||||
|
||||
if (tableParams.search)
|
||||
$('.remove-search-btn-'+ctx.tableName).show();
|
||||
clearSearchElements.show();
|
||||
else
|
||||
$('.remove-search-btn-'+ctx.tableName).hide();
|
||||
clearSearchElements.hide();
|
||||
|
||||
$('.table-count-' + ctx.tableName).text(tableData.total);
|
||||
tableTotal = tableData.total;
|
||||
@@ -230,9 +234,8 @@ function tableInit(ctx){
|
||||
|
||||
} else {
|
||||
/* Not orderable */
|
||||
header.addClass("muted");
|
||||
header.css("font-weight", "normal");
|
||||
header.append(col.title+' ');
|
||||
header.append('<span class="muted">' + col.title + '</span> ');
|
||||
}
|
||||
|
||||
/* Setup the filter button */
|
||||
@@ -665,7 +668,7 @@ function tableInit(ctx){
|
||||
loadData(tableParams);
|
||||
});
|
||||
|
||||
$('.remove-search-btn-'+ctx.tableName).click(function(e){
|
||||
clearSearchElements.click(function(e){
|
||||
e.preventDefault();
|
||||
|
||||
tableParams.page = 1;
|
||||
|
||||
Reference in New Issue
Block a user