diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-11-13 13:48:35 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-11-16 11:43:38 +0000 |
commit | 872bd5ccf58236f5146b1640cc1c465b58371e44 (patch) | |
tree | 17a3da9c5bf6932abf76f07da09d131bbc18f3c7 | |
parent | a981700701c41c7bbb6a9778e95f691278c5c294 (diff) | |
download | bitbake-872bd5ccf58236f5146b1640cc1c465b58371e44.tar.gz |
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.
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/toaster/toastergui/static/js/projectpage.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/toaster/toastergui/static/js/projectpage.js b/lib/toaster/toastergui/static/js/projectpage.js index e742ef291..ae08d9a85 100644 --- a/lib/toaster/toastergui/static/js/projectpage.js +++ b/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); |