From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 44967E00951; Wed, 23 Mar 2016 04:54:16 -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=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.44 listed in list.dnswl.org] * -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-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DA468E00920 for ; Wed, 23 Mar 2016 04:54:11 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id p65so20555381wmp.0 for ; Wed, 23 Mar 2016 04:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=NwYAqwhQqiNt1S9tVCLVIzFKHmDLTTZBG304kRN1lpw=; b=EQz0spM1Y2TEsjUtKNUccWuNS47hfmeWNYtXazjWUwOZrRn8px77w9DGPEn6iDpH86 +LlSDre0xHcrH9mq8p3XYn9wXqNWKpW6KstTAQqVft5pWEPXMxfFK0VIFAYaP8xJ5pgB AeW9O80dUunY77+8Kzs7REDVRzLUWxM5E0+UONnDXqXOUtRqVEds5WvKNl928hHWKPYT mRSYs2X/cT20OLG6NTa3FdvKg3oEBXn64bMPlEKDT2+pkPnAekxEFVH7ekQ7SBLrYBW0 eVJajQfus0fgi0Xe18Ps5rp22uJtmPkAbdRTv36kL526lDZqRH5MnB8mW9XsPrjw8jJv X99A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=NwYAqwhQqiNt1S9tVCLVIzFKHmDLTTZBG304kRN1lpw=; b=kTjE5ZZd18rEOE+uPPMxH+8JaBzCpQEWTMbtx5BBTknQiYem1kWP1T8Vt1o+rd4xgF 1pT8WvQsapP4fkbOg3T9dTZhgyiw4ce5OLQJONbjftLjlJbh8H8YudFFsex5R0qRXr15 dzzpUzCyz4/uVdXJEwna5kQgBud/ign345LAO9rVDEJ9dn2mFLSWTHSLI/oRkOUpiJv3 A61Dftf5hJfK4B+YrDV2CVnFWs3R+pT/zysl3hYSwNrhj8YTdLEF+GLL5LCFm2Hc12Ey Y9d1PypQs5lhUITwJGsdgls70EW59AEtk+jylEMB4XDc7K/xcNA3G53HASs9TfqZ2QnJ sWAQ== X-Gm-Message-State: AD7BkJL0Ksz/YTA6VxmYVu80hhq3J5t14x9P8psHDpFuAuw7a45UP5ydRbUYEpN8gDMvLArC X-Received: by 10.194.222.234 with SMTP id qp10mr2980601wjc.138.1458734050640; Wed, 23 Mar 2016 04:54:10 -0700 (PDT) Received: from [192.168.2.24] ([83.217.123.106]) by smtp.googlemail.com with ESMTPSA id t82sm2580782wmt.17.2016.03.23.04.54.09 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 04:54:09 -0700 (PDT) To: toaster@yoctoproject.org References: <1458577001-16577-1-git-send-email-elliot.smith@intel.com> From: Michael Wood Message-ID: <56F283E1.7060206@intel.com> Date: Wed, 23 Mar 2016 11:54:09 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Subject: Re: [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: Wed, 23 Mar 2016 11:54:16 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit I'd rather you didn't remove the chrome redraw optimisation, that saves redrawing the chrome on lots of other table operations. Just storing the default order by would be sufficient: diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/to index a7e4fba..e9c5225 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -232,6 +232,10 @@ function tableInit(ctx){ } } + if (col.field_name === tableData.default_orderby){ + title.addClass("default-orderby"); + } + } else { /* Not orderable */ header.css("font-weight", "normal"); @@ -377,7 +381,7 @@ function tableInit(ctx){ if (col === tableParams.orderby || '-' + col === tableParams.orderby){ tableParams.orderby = null; - loadData(tableParams); + $("#"+ctx.tableName +" .default-orderby").click(); } } Michael On 23/03/16 10:57, Barros Pena, Belen wrote: > > On 23/03/2016 10:49, "Smith, Elliot" wrote: > >> I think I should probably fix those tables, too, even though they're not >> ToasterTables. Especially since you took the time to test all of them. > Up to you really. Not to concerned about it, to be honest, although it > would be nice :) > > Thanks! > > Belén > >> >> Elliot >> >> >> On 23 March 2016 at 10:40, Barros Pena, Belen >> wrote: >> >> >> >> On 21/03/2016 16:16, "toaster-bounces@yoctoproject.org on behalf of Elliot >> Smith" > elliot.smith@intel.com> wrote: >> >>> 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] >> So, tested this across Toaster (if a table is not on the list, it means >> the bug doesn't apply because either only one column is sortable, or >> because none of the sortable columns can be hidden using the 'edit >> columns' menu). >> >> It seems to work in all the tables implemented with ToasterTable >> >> * Image recipes >> * Image recipe details (packages included) >> * Custom image recipe details (add | remove packages) >> * Software recipes >> * Machines >> * Layers >> * All builds >> * Project builds >> >> If the scope of the patch is only tables implemented with ToasterTable, >> then this is good to go. For the sake of completion, this is working in >> the following tables *not* implemented with ToasterTable >> >> >> >> * Recipes >> * Packages >> >> It doesn't seem to work in the following tables *not* implemented with >> ToasterTable >> >> * Packages included >> * Tasks (and by extension Time, CPU time and disk I/O since they are the >> same as the tasks table). >> >> Thanks! >> >> Belén >> >>> 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. >>> >> >>> -- >>> _______________________________________________ >>> toaster mailing list >>> toaster@yoctoproject.org >>> https://lists.yoctoproject.org/listinfo/toaster >> >> >> >> >> >> >> >> -- >> Elliot Smith >> Software Engineer >> Intel Open Source Technology Centre >> >> >>