Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 2E018E00B21; Tue, 10 Nov 2015 04:39:25 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D1EC7E00B05 for ; Tue, 10 Nov 2015 04:39:22 -0800 (PST) Received: by wmww144 with SMTP id w144so115780004wmw.1 for ; Tue, 10 Nov 2015 04:39:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1FAdZ6pFgkQgXJg9+42U9zGKJbMXcI9YIDt7Mpe6xvQ=; b=MpWXtb30+0cTo6OVUZ7tHjLzuM+X0ieNGC9T9sqmaMP9q54hWXeaCu2dOri0zyxSH5 R1ASoQc5yPzgrowGeB1eqZK+/k4KU7SfybOLl9ZKWI8NwGRR2b/ss8xZ7K/7VrMdTUNI DWrLOPftZtiWXWOYl+W0ItB6h3q7n5Asy5yRF1wvu8bnUyaR0AFcB7VGjaAqYDs128js ehWaQJVeDd/t3bvFbMfY7H277c3jRgYYGLfDKjXMcUyNM4gvUMQCPbw5My4R0zoeIIEP IIO+ValgBkLJNM1vjSFz/BonqAFC5gf1PCQY8yRALB/FK+25mGmlPuTQ0dD7MYTa9WeM mang== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1FAdZ6pFgkQgXJg9+42U9zGKJbMXcI9YIDt7Mpe6xvQ=; b=bE0Zi3rR2yxzjD6soxq3S2tK4UnW6etVw4Lm/2A6XREnb9NGf6Y7oBKyWaz516i11V SXUfu/YdHQyZo2XK0j9Nvn67HjVeqQ2dpHySuYLRZFI9tmda1ZbSeFMzRKc6NREcq8sV OQC2jfpJdQNudpybRr552Opm8tVJfVozZdj4fvZ+OtUX3vnwRImH+uW2SxAVnnATr29U YtyWPhmmTsYfL/cHcVqSMuOrhy3VzLqMY3I8+uYX/W4V2B7F1i0wWTEh24bYBl0ppNxV ONSa9ArblQ0zTnIeChoPlUYCpyFutZ2dDRNWA7IDNFzT6sYwFAjJktvF26IrX3e8neg4 qvMA== X-Gm-Message-State: ALoCoQnYGI9spIuk9YtpLSSN/pxfMhVLfJvO2LZl5xd9+Bp86ZYZYNWobpEHEwhPatIQccelPJ/M X-Received: by 10.194.249.97 with SMTP id yt1mr2763570wjc.89.1447159161820; Tue, 10 Nov 2015 04:39:21 -0800 (PST) Received: from dorado.Home ([90.199.203.61]) by smtp.gmail.com with ESMTPSA id os9sm3320075wjc.26.2015.11.10.04.39.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Nov 2015 04:39:21 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 10 Nov 2015 12:39:04 +0000 Message-Id: <1447159146-18082-2-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1447159146-18082-1-git-send-email-michael.g.wood@intel.com> References: <1447159146-18082-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 2/4] toaster: projectpage Disable/Enable build input if we have 0 layers X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 12:39:25 -0000 If we've removed all the layers in the configuration disabled the build button and build input. Signed-off-by: Michael Wood --- 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