diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-11-26 15:59:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-07 17:01:20 +0000 |
commit | b90a8dca99656c5f4dead0e092c7e1c0e27fe640 (patch) | |
tree | 6133e8632fb1e7d2f4bc1d7dc9ade76381a43a9a /bitbake/lib | |
parent | c075bcf5459d782cb89aaf1a39253b334847f34f (diff) | |
download | openembedded-core-contrib-b90a8dca99656c5f4dead0e092c7e1c0e27fe640.tar.gz |
bitbake: toaster: tablejs Make sure click handlers consume click event
Avoid the click event from propagating and causing strange side effects
in toaster tables.
[YOCTO #8527]
[YOCTO #8148]
(Bitbake rev: f23e54292a673b2fd3f17d317c21984c753727c7)
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')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/table.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index 40b5022deb..c69c205d50 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -340,7 +340,8 @@ function tableInit(ctx){ } } - function sortColumnClicked(){ + function sortColumnClicked(e){ + e.preventDefault(); /* We only have one sort at a time so remove any existing sort indicators */ $("#"+ctx.tableName+" th .icon-caret-down").hide(); @@ -476,6 +477,7 @@ function tableInit(ctx){ }); $("#search-submit-"+ctx.tableName).click(function(e){ + e.preventDefault(); var searchTerm = $("#search-input-"+ctx.tableName).val(); tableParams.page = 1; @@ -489,8 +491,6 @@ function tableInit(ctx){ } loadData(tableParams); - - e.preventDefault(); }); $('.remove-search-btn-'+ctx.tableName).click(function(e){ @@ -514,7 +514,9 @@ function tableInit(ctx){ e.preventDefault(); }); - $("#clear-filter-btn-"+ctx.tableName).click(function(){ + $("#clear-filter-btn-"+ctx.tableName).click(function(e){ + e.preventDefault(); + var filterBtn = $("#" + tableParams.filter.split(":")[0]); filterBtnActive(filterBtn, false); |