Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 83545E00C8B; Fri, 13 Nov 2015 06:33:58 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2FCCCE00C86 for ; Fri, 13 Nov 2015 06:33:57 -0800 (PST) Received: by wmww144 with SMTP id w144so33212423wmw.0 for ; Fri, 13 Nov 2015 06:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=mca0QJRrbEcVw2kXxOynZokC0Oz0lw5Umj2sVrlPErc=; b=atBkoEUUyA7uh5O40RLHn4bcaa4OOVDoKkxrLt0Kw3rS7Fu8/fiZfdndZWlCKmClyD 1lXQQMXI/PPFXU1AXqdN2EKCwyhAuJ+SMu2uIu9Lk5PxhJOUldytj5MtE5FeWdn2o1/K Fr1BT7w2dHP9nGlaFnPZPdijEtja5o7veKifeV31OWNglLFt8K8n2rEFhdznvZ136UUT fgQPsRK5YfIKCawe+ViXo7Mab8pT13yWNBMOLt91YYf4Ab+ZRKcGwwGC5yMZMrJhivva vhkNlvpEc3auvhhqYqtqj6QQ6RaxnqkSUYnaApRIeEt2a9WdWoWldKkQtFTbczn+vIoM Grgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mca0QJRrbEcVw2kXxOynZokC0Oz0lw5Umj2sVrlPErc=; b=FOSbFBGyYq+Si3rhPuHUtpH2uCkgOksyzAAhZjpZNlB471n85gbqIo0hzEAvISoTQZ 7LOMoc++I7lsLbWy6pPvZWD3emaV/VAww3VGqfssG/5IV/h5M64TJdQaxdtPPMhGTJc7 c1SBZOoy380li2t/GdLLts3UzfhbTcDoaGkIVrgBVfNW6rG5VFXdtt+BA+BUzYmPhoXG cfoXCZf9OjkF3CfpuCAYUYQDPRilMGgWosWjKODEcoXixXSTq2kLE9c0x4CuHoqzWu2G 1oR83hFqRwiTapEqKokOtQIt+yPnZrFAcKWUKSBv/eO61vDTw4WqwYTUnG2xG6KkETaW +SuQ== X-Gm-Message-State: ALoCoQnXO/zsDml/raa/LGmgZDetD3+WuBIMssDKw1Qy7ANoNjrM+YqMqBe3Z2c3S6Jbx9kSC2rD X-Received: by 10.28.217.6 with SMTP id q6mr4480375wmg.5.1447425235705; Fri, 13 Nov 2015 06:33:55 -0800 (PST) Received: from dorado.Home ([90.199.203.61]) by smtp.gmail.com with ESMTPSA id z13sm14515535wjr.47.2015.11.13.06.33.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 06:33:54 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 13 Nov 2015 14:33:51 +0000 Message-Id: <1447425231-11799-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.5.0 Subject: [PATCH] toaster: tablejs Make sure click handlers consume click event X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 14:33:58 -0000 Avoid the click event from propagating and causing strange side effects in toaster tables. [YOCTO #8527] [YOCTO #8148] Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/static/js/table.js | 10 ++++++---- 1 file 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 40b5022..c69c205 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); -- 2.5.0