[Toaster] [PATCH 2/4] toaster: projectpage Disable/Enable build input if we have 0 layers
Michael Wood
michael.g.wood at intel.com
Tue Nov 10 04:39:04 PST 2015
If we've removed all the layers in the configuration disabled the build
button and build input.
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
bitbake/lib/toaster/toastergui/static/js/projectpage.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/bitbake/lib/toaster/toastergui/static/js/projectpage.js
index e742ef2..ae08d9a 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);
--
2.5.0
More information about the toaster
mailing list