aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:00:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:29:59 +0000
commit1a4b203ca59bcf953b030dc582e298ce13cf3470 (patch)
tree6db26e71ca5b382853560e58bfbd4275fe68026d /bitbake
parent809046c6fbd544907b5d5f3bb554b71724c74661 (diff)
downloadopenembedded-core-contrib-1a4b203ca59bcf953b030dc582e298ce13cf3470.tar.gz
bitbake: toastergui: switch off filter highlights when inactive
In ToasterTables with multiple columns which allow filtering (e.g. all builds), selecting one filter, then a second filter (e.g. selecting "failed builds" then "outcome" for all builds), would result in both filters being highlighted at the same time. Fix this by removing the "active" highlight on all column filter buttons when a new filter value is submitted (via the filter modal). NB to enable this, added a data-filter-on attribute to all column filter buttons to make them easy to select. [YOCTO #8738] (Bitbake rev: 7347ad0d4baace593751b44a86ab8e11a04a02b6) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/table.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js
index fa01ddf47e..63f8a1fed7 100644
--- a/bitbake/lib/toaster/toastergui/static/js/table.js
+++ b/bitbake/lib/toaster/toastergui/static/js/table.js
@@ -248,7 +248,7 @@ function tableInit(ctx){
/* Setup the filter button */
if (col.filter_name){
- var filterBtn = $('<a href="#" role="button" class="pull-right btn btn-mini" data-toggle="modal"><i class="icon-filter filtered"></i></a>');
+ var filterBtn = $('<a href="#" role="button" data-filter-on="' + col.filter_name + '" class="pull-right btn btn-mini" data-toggle="modal"><i class="icon-filter filtered"></i></a>');
filterBtn.data('filter-name', col.filter_name);
filterBtn.prop('id', col.filter_name);
@@ -565,6 +565,12 @@ function tableInit(ctx){
$("#filter-modal-form-"+ctx.tableName).submit(function(e){
e.preventDefault();
+ /* remove active status from all filter buttons so that only one filter
+ can be active at a time */
+ $('[data-filter-on]').each(function (index, filterBtn) {
+ filterBtnActive($(filterBtn), false);
+ });
+
tableParams.filter = $(this).find("input[type='radio']:checked").val();
var filterBtn = $("#" + tableParams.filter.split(":")[0]);