bitbake: toastergui: Move click disabled check after table ready event

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.

(Bitbake rev: 8245a7d679914ca7d4548ab7e83b5047ff8a1ff5)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood authored and Richard Purdie committed 2015-08-06 16:04:49 -05:00
1 parent c1993d08cc
commit 5194f0401e
1 file changed
+6 -4
@@ -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();