]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: projectpage Disable/Enable build input if we have 0 layers
authorMichael Wood <michael.g.wood@intel.com>
Fri, 13 Nov 2015 13:48:35 +0000 (13:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Nov 2015 11:43:38 +0000 (11:43 +0000)
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>
lib/toaster/toastergui/static/js/projectpage.js

index e742ef291a6a3d6c7fc25926ef90a8dc6cd6ca72..ae08d9a857aff895de27962fce1654834e19655a 100644 (file)
@@ -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);