Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 128E6E00BF5; Mon, 11 Jan 2016 03:05:46 -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 F2D2EE00BAA for ; Mon, 11 Jan 2016 03:05:26 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 11 Jan 2016 03:05:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,552,1444719600"; d="scan'208";a="890732953" 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:25 -0800 From: Elliot Smith To: toaster@yoctoproject.org Date: Mon, 11 Jan 2016 11:04:42 +0000 Message-Id: <1452510291-21616-14-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 13/22] toaster: toastergui Don't hide all elements with .col class 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:46 -0000 Disabling the "project" column in a ToasterTable for builds causes the recent builds area to be hidden. This is because the column hiding code hides all elements with a class matching ".", regardless of where they occur on the page; and the recent builds area was using the ".project-name" class, which means it is included in the set of elements which are hidden. Scope the element search to the table so that only elements within the table are hidden or shown. [YOCTO #8792] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/toastergui/static/js/table.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index 7ac4ed5..c154844 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -316,7 +316,7 @@ function tableInit(ctx){ $("#"+ctx.tableName+" th").each(function(){ for (var i in cols_hidden){ if ($(this).hasClass(cols_hidden[i])){ - $("."+cols_hidden[i]).hide(); + table.find("."+cols_hidden[i]).hide(); $("#checkbox-"+cols_hidden[i]).removeAttr("checked"); } } @@ -326,7 +326,7 @@ function tableInit(ctx){ * user setting. */ for (var i in defaultHiddenCols) { - $("."+defaultHiddenCols[i]).hide(); + table.find("."+defaultHiddenCols[i]).hide(); $("#checkbox-"+defaultHiddenCols[i]).removeAttr("checked"); } } @@ -370,9 +370,9 @@ function tableInit(ctx){ var disabled_cols = []; if ($(this).prop("checked")) { - $("."+col).show(); + table.find("."+col).show(); } else { - $("."+col).hide(); + table.find("."+col).hide(); /* If we're ordered by the column we're hiding remove the order by */ if (col === tableParams.orderby || '-' + col === tableParams.orderby){ -- Elliot Smith Software Engineer Intel OTC --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.