Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 36EA0E00B04; Mon, 16 Nov 2015 07:09:24 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D5EFCE00AFD for ; Mon, 16 Nov 2015 07:09:22 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 16 Nov 2015 07:09:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,303,1444719600"; d="scan'208";a="851893227" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga002.jf.intel.com with ESMTP; 16 Nov 2015 07:09:21 -0800 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX106.ger.corp.intel.com (163.33.3.31) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Nov 2015 15:09:20 +0000 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.163]) by irsmsx112.ger.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Mon, 16 Nov 2015 15:09:19 +0000 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH] toaster: tablejs Make sure click handlers consume click event Thread-Index: AQHRIIDESohnpIvIHEKkXu3hmEmfFQ== Date: Mon, 16 Nov 2015 15:09:19 +0000 Message-ID: References: <1447425231-11799-1-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1447425231-11799-1-git-send-email-michael.g.wood@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.7.151005 x-originating-ip: [10.237.224.84] MIME-Version: 1.0 Subject: Re: [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: Mon, 16 Nov 2015 15:09:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <64CB3E59BBF47645A6F2C70A369EE18D@intel.com> Content-Transfer-Encoding: quoted-printable On 13/11/2015 14:33, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" wrote: >Avoid the click event from propagating and causing strange side effects >in toaster tables. > >[YOCTO #8527] >[YOCTO #8148] This definitely fixes 8527. I was never able to reproduce 8148, I'm afraid, but the sorting seems to be working for me with this patch. Thanks! Bel=E9n > >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){ > } > } >=20 >- function sortColumnClicked(){ >+ function sortColumnClicked(e){ >+ e.preventDefault(); >=20 > /* 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){ > }); >=20 > $("#search-submit-"+ctx.tableName).click(function(e){ >+ e.preventDefault(); > var searchTerm =3D $("#search-input-"+ctx.tableName).val(); >=20 > tableParams.page =3D 1; >@@ -489,8 +491,6 @@ function tableInit(ctx){ > } >=20 > loadData(tableParams); >- >- e.preventDefault(); > }); >=20 > $('.remove-search-btn-'+ctx.tableName).click(function(e){ >@@ -514,7 +514,9 @@ function tableInit(ctx){ > e.preventDefault(); > }); >=20 >- $("#clear-filter-btn-"+ctx.tableName).click(function(){ >+ $("#clear-filter-btn-"+ctx.tableName).click(function(e){ >+ e.preventDefault(); >+ > var filterBtn =3D $("#" + tableParams.filter.split(":")[0]); > filterBtnActive(filterBtn, false); >=20 >--=20 >2.5.0 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster