Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A7772E00BB6; Mon, 11 Jan 2016 03:05:59 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.65 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DEBD1E00BC4 for ; Mon, 11 Jan 2016 03:05:34 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 11 Jan 2016 03:05:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,552,1444719600"; d="scan'208";a="890733036" Received: from bjmcgrat-mobl3.amr.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.6.89]) by fmsmga002.fm.intel.com with ESMTP; 11 Jan 2016 03:05:33 -0800 From: Elliot Smith To: toaster@yoctoproject.org Date: Mon, 11 Jan 2016 11:04:47 +0000 Message-Id: <1452510291-21616-19-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1452510291-21616-1-git-send-email-elliot.smith@intel.com> References: <1452510291-21616-1-git-send-email-elliot.smith@intel.com> Subject: [review-request][PATCH 18/22] toaster: toastergui Mute label for filter actions with no records 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: Mon, 11 Jan 2016 11:05:59 -0000 The radio button for a filter action is disabled if that filter action has no associated records. However, the label retains the normal font styling, so it's unclear that the action is not available. Add the "muted" class to the label for a filter action (and still disable its radio button) if it has no records associated with it. [YOCTO #8738] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/toastergui/static/js/table.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index a253917..9384386 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -399,18 +399,21 @@ function tableInit(ctx){ * show when selected */ function createActionRadio(filterName, filterActionData) { + var hasNoRecords = (Number(filterActionData.count) == 0); + var actionStr = '
' + '' + '' + - '