Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E950FE00A01; Thu, 6 Aug 2015 07:16:57 -0700 (PDT) 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,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 * [209.85.212.173 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 5B90AE00867 for ; Thu, 6 Aug 2015 07:16:56 -0700 (PDT) Received: by wibxm9 with SMTP id xm9so24597757wib.0 for ; Thu, 06 Aug 2015 07:16:55 -0700 (PDT) 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:in-reply-to :references; bh=MAjx3ETu8w+t4TdZM50WO+q1FH3IsitGNqZV8fmwGR8=; b=cHh/wqNl9F4kA1caFp5jHjL6GNIaSNHD+x0ntEagLJV6OYl5UtTNgZc/RRNpYDMNSc 5R35qkR9e+xKmhtWBLQk1PUUVJGu5RxuPOTFhe8ta1a2iR6haVW5q7shf9KHk7jnPg4C jSRqkJED7SlOYG2PHAWAG9IR1yFUJ9o1UxG9yBY1JIocxgUEQLbRGjPA9SgQn/k00sRV e+fyd+Twxg6dZu/WbGgHtzmulZ2b+v0PNsZjtqGwUnNz6x1nFdmwy2bcA9Ye1ZSvdKdQ xe0EkdMaqtbB1iJQM2Eh5ithsF6JJebCxbW17+IxOQYrInYMnPl1E3Ah85GSJoZu9dhL Rudw== X-Gm-Message-State: ALoCoQmyMC00pf9MWV6Ozf2z52gp29hF/1/o9j2dcvnQTfHDjhOnsuWe7xsYUowVhxjSF7Isgrdl X-Received: by 10.180.78.98 with SMTP id a2mr6907968wix.50.1438870615438; Thu, 06 Aug 2015 07:16:55 -0700 (PDT) Received: from draco.icx.intel.com ([83.217.123.106]) by smtp.gmail.com with ESMTPSA id l13sm9751068wjr.18.2015.08.06.07.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Aug 2015 07:16:54 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 6 Aug 2015 15:16:24 +0100 Message-Id: <1438870586-17099-2-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438870586-17099-1-git-send-email-michael.g.wood@intel.com> References: <1438870586-17099-1-git-send-email-michael.g.wood@intel.com> Subject: [review-request][PATCH 2/4] bitbake: toastergui: Move click disabled check after table ready 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: Thu, 06 Aug 2015 14:16:58 -0000 We were attaching this handler before the elements were fully ready in the dom. Which allowed these links although disabled to take users to the change machine page. Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js index be6bbcd..d12d3ae 100644 --- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js +++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js @@ -202,6 +202,12 @@ function layerDetailsPageInit (ctx) { /* re run the machinesTabShow to update the text */ machinesTabShow(); } + + $(".select-machine-btn").click(function(e){ + if ($(this).attr("disabled") === "disabled") + e.preventDefault(); + }); + }); $("#targets-tab").on('show', targetsTabShow); @@ -385,10 +391,6 @@ function layerDetailsPageInit (ctx) { $(this).parents("form").submit(); }); - $(".select-machine-btn").click(function(e){ - if ($(this).attr("disabled") === "disabled") - e.preventDefault(); - }); layerDepsList.find(".icon-trash").click(layerDepRemoveClick); layerDepsList.find("a").tooltip(); -- 2.1.4