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 | |
parent | c075bcf5459d782cb89aaf1a39253b334847f34f (diff) | |
download | poky-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')
-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){ | |||
340 | } | 340 | } |
341 | } | 341 | } |
342 | 342 | ||
343 | function sortColumnClicked(){ | 343 | function sortColumnClicked(e){ |
344 | e.preventDefault(); | ||
344 | 345 | ||
345 | /* We only have one sort at a time so remove any existing sort indicators */ | 346 | /* We only have one sort at a time so remove any existing sort indicators */ |
346 | $("#"+ctx.tableName+" th .icon-caret-down").hide(); | 347 | $("#"+ctx.tableName+" th .icon-caret-down").hide(); |
@@ -476,6 +477,7 @@ function tableInit(ctx){ | |||
476 | }); | 477 | }); |
477 | 478 | ||
478 | $("#search-submit-"+ctx.tableName).click(function(e){ | 479 | $("#search-submit-"+ctx.tableName).click(function(e){ |
480 | e.preventDefault(); | ||
479 | var searchTerm = $("#search-input-"+ctx.tableName).val(); | 481 | var searchTerm = $("#search-input-"+ctx.tableName).val(); |
480 | 482 | ||
481 | tableParams.page = 1; | 483 | tableParams.page = 1; |
@@ -489,8 +491,6 @@ function tableInit(ctx){ | |||
489 | } | 491 | } |
490 | 492 | ||
491 | loadData(tableParams); | 493 | loadData(tableParams); |
492 | |||
493 | e.preventDefault(); | ||
494 | }); | 494 | }); |
495 | 495 | ||
496 | $('.remove-search-btn-'+ctx.tableName).click(function(e){ | 496 | $('.remove-search-btn-'+ctx.tableName).click(function(e){ |
@@ -514,7 +514,9 @@ function tableInit(ctx){ | |||
514 | e.preventDefault(); | 514 | e.preventDefault(); |
515 | }); | 515 | }); |
516 | 516 | ||
517 | $("#clear-filter-btn-"+ctx.tableName).click(function(){ | 517 | $("#clear-filter-btn-"+ctx.tableName).click(function(e){ |
518 | e.preventDefault(); | ||
519 | |||
518 | var filterBtn = $("#" + tableParams.filter.split(":")[0]); | 520 | var filterBtn = $("#" + tableParams.filter.split(":")[0]); |
519 | filterBtnActive(filterBtn, false); | 521 | filterBtnActive(filterBtn, false); |
520 | 522 | ||