From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 6E287E00B45; Mon, 21 Mar 2016 09:17:28 -0700 (PDT) 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: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -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] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 88EEAE00951 for ; Mon, 21 Mar 2016 09:17:26 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 21 Mar 2016 09:16:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,372,1455004800"; d="scan'208";a="941925452" Received: from jsanz-mobl2.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.5.136]) by fmsmga002.fm.intel.com with ESMTP; 21 Mar 2016 09:16:58 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Mon, 21 Mar 2016 16:16:41 +0000 Message-Id: <1458577001-16577-1-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [PATCH] toaster: ensure ToasterTable chrome is redrawn when ordering changes 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, 21 Mar 2016 16:17:28 -0000 If a ToasterTable is ordered by an optional column and that column is subsequently hidden, the table ordering switches back to the default ordering for the table. However, the table headings don't update to reflect the new ordering. This is because the code which sets the heading weight and hides/shows the caret symbols only runs when the table is first loaded. Remove the guard variable which prevents the table chrome from being set when the table is updated. This resets formatting of the column headings so that the correct heading is highlighted for the ordering which is being used. [YOCTO #9011] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/toastergui/static/js/table.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index a7e4fba..c8dcd26 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -6,7 +6,6 @@ function tableInit(ctx){ throw "No url supplied for retreiving data"; } - var tableChromeDone = false; var tableTotal = 0; var tableParams = { @@ -178,9 +177,6 @@ function tableInit(ctx){ } function setupTableChrome(tableData){ - if (tableChromeDone === true) - return; - var tableHeadRow = table.find("thead"); var editColMenu = $("#table-chrome-"+ctx.tableName).find(".editcol"); @@ -279,8 +275,6 @@ function tableInit(ctx){ editColMenu.append(toggler); } /* End for each column */ - - tableChromeDone = true; } /* Toggles the active state of the filter button */ -- 1.9.3 --------------------------------------------------------------------- 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.