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>
This commit is contained in:
Michael Wood 2015-11-26 15:59:01 +00:00 committed by Richard Purdie
parent c075bcf545
commit b90a8dca99
1 changed files with 6 additions and 4 deletions

View File

@ -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);