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 <[email protected]> --- 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 [email protected] https://lists.yoctoproject.org/listinfo/toaster
