From e9d4962a0c1c7ed6861fd11a33b06e81f1121aa3 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Fri, 13 Nov 2015 13:48:35 +0000 Subject: bitbake: toaster: projectpage Disable/Enable build input if we have 0 layers If we've removed all the layers in the configuration, disable the build button and build input. (Bitbake rev: 872bd5ccf58236f5146b1640cc1c465b58371e44) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/projectpage.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/bitbake/lib/toaster/toastergui/static/js/projectpage.js index e742ef291a..ae08d9a857 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectpage.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectpage.js @@ -175,11 +175,18 @@ function projectPageInit(ctx) { function updateLayersCount(){ var count = $("#layers-in-project-list").children().length; + var noLayerMsg = $("#no-layers-in-project"); + var buildInput = $("#build-input"); - if (count === 0) + + if (count === 0) { + noLayerMsg.fadeIn(); $("#no-layers-in-project").fadeIn(); - else - $("#no-layers-in-project").hide(); + buildInput.attr("disabled", "disabled"); + } else { + noLayerMsg.hide(); + buildInput.removeAttr("disabled"); + } $("#project-layers-count").text(count); -- cgit v1.2.3-54-g00ecf