[oe-commits] [bitbake] 01/10: toaster: ensure ToasterTable headings are reset when order by changes
git at git.openembedded.org
git at git.openembedded.org
Tue Apr 19 20:13:36 UTC 2016
rpurdie pushed a commit to branch 1.30
in repository bitbake.
commit 820761e664cd2d62cc6c333a0e59580b0c4a034d
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Tue Apr 19 17:28:38 2016 +0100
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]
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/toastergui/static/js/table.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/toastergui/static/js/table.js b/lib/toaster/toastergui/static/js/table.js
index 2ae7695..f738144 100644
--- a/lib/toaster/toastergui/static/js/table.js
+++ b/lib/toaster/toastergui/static/js/table.js
@@ -239,6 +239,10 @@ function tableInit(ctx){
}
}
+ if (col.field_name === tableData.default_orderby){
+ title.addClass("default-orderby");
+ }
+
} else {
/* Not orderable */
header.css("font-weight", "normal");
@@ -384,7 +388,7 @@ function tableInit(ctx){
if (col === tableParams.orderby ||
'-' + col === tableParams.orderby){
tableParams.orderby = null;
- loadData(tableParams);
+ $("#"+ctx.tableName +" .default-orderby").click();
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list