From ec083fd943c6996307beb3be3421403870d2f2b7 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 4 Jul 2016 16:34:45 +0100 Subject: [PATCH] toaster: layerBtn avoid connecting handler to other build buttons Some pages contain other build buttons which may have the same class attached. Make sure that we only select the buttons in the tables where layerBtn is used. [YOCTO #9841] Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- lib/toaster/toastergui/static/js/layerBtn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/toaster/toastergui/static/js/layerBtn.js b/lib/toaster/toastergui/static/js/layerBtn.js index 259271df33c..9f9eda1e1e7 100644 --- a/lib/toaster/toastergui/static/js/layerBtn.js +++ b/lib/toaster/toastergui/static/js/layerBtn.js @@ -55,8 +55,8 @@ function layerBtnsInit() { }); }); - $(".build-recipe-btn").unbind('click'); - $(".build-recipe-btn").click(function(e){ + $("td .build-recipe-btn").unbind('click'); + $("td .build-recipe-btn").click(function(e){ e.preventDefault(); var recipe = $(this).data('recipe-name'); -- 2.47.3