summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-04-19 17:28:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-19 21:11:25 +0100
commit1b11b79f505d3535ad49c415c66117b55d8f14e0 (patch)
treed1a38a6a178f190a148b83e0ca57b5988e7b7ae5 /bitbake/lib/toaster/toastergui/static/js
parent98558405bf17532faa35f15c3b0ab73c42134fd4 (diff)
downloadpoky-1b11b79f505d3535ad49c415c66117b55d8f14e0.tar.gz
bitbake: toaster: ensure ToasterTable headings are reset when order by changes
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. Store the default order by and re-apply it when the data is updated. [YOCTO #9011] (Bitbake rev: 820761e664cd2d62cc6c333a0e59580b0c4a034d) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/table.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js
index 2ae7695071..f738144ae5 100644
--- a/bitbake/lib/toaster/toastergui/static/js/table.js
+++ b/bitbake/lib/toaster/toastergui/static/js/table.js
@@ -239,6 +239,10 @@ function tableInit(ctx){
239 } 239 }
240 } 240 }
241 241
242 if (col.field_name === tableData.default_orderby){
243 title.addClass("default-orderby");
244 }
245
242 } else { 246 } else {
243 /* Not orderable */ 247 /* Not orderable */
244 header.css("font-weight", "normal"); 248 header.css("font-weight", "normal");
@@ -384,7 +388,7 @@ function tableInit(ctx){
384 if (col === tableParams.orderby || 388 if (col === tableParams.orderby ||
385 '-' + col === tableParams.orderby){ 389 '-' + col === tableParams.orderby){
386 tableParams.orderby = null; 390 tableParams.orderby = null;
387 loadData(tableParams); 391 $("#"+ctx.tableName +" .default-orderby").click();
388 } 392 }
389 } 393 }
390 394