diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-05-26 16:12:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-13 22:04:30 +0100 |
commit | 927bfc26ffcb0eb6c0a5b3c0905b7efc2f19b9a2 (patch) | |
tree | 35c00f81bde271a7f9c0e7b9f3ec9bfaf82eee1b /lib/toaster/toastergui/static | |
parent | 2418c092abd9a503becf5e786125f8cdddd8652c (diff) | |
download | bitbake-contrib-927bfc26ffcb0eb6c0a5b3c0905b7efc2f19b9a2.tar.gz |
toaster: table.js Add the ability to highlight a particular row
As in the old build tables it's useful to jump and highlight a
particular row in the table using the #hash in the URL.
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/static')
-rw-r--r-- | lib/toaster/toastergui/static/js/table.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/static/js/table.js b/lib/toaster/toastergui/static/js/table.js index 749eb8e75..7b5510254 100644 --- a/lib/toaster/toastergui/static/js/table.js +++ b/lib/toaster/toastergui/static/js/table.js @@ -170,6 +170,15 @@ function tableInit(ctx){ table.css("padding-bottom", 0); tableContainer.css("visibility", "visible"); + /* If we have a hash in the url try and highlight that item in the table */ + if (window.location.hash){ + var highlight = $("table a[name="+window.location.hash.replace('#','')); + if (highlight.length > 0){ + highlight.parents("tr").addClass('highlight'); + window.scroll(0, highlight.position().top - 50); + } + } + table.trigger("table-done", [tableData.total, tableParams]); } |