diff --git a/bitbake/lib/toaster/toastergui/static/js/layerBtn.js b/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
index 4243c2bf01..a0509f9aa3 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
@@ -55,6 +55,19 @@ function layerBtnsInit(ctx) {
});
});
+ $(".build-recipe-btn").unbind('click');
+ $(".build-recipe-btn").click(function(e){
+ e.preventDefault();
+ var recipe = $(this).data('recipe-name');
+
+ libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl,
+ libtoaster.ctx.projectId, recipe,
+ function(){
+ /* Success */
+ window.location.replace(libtoaster.ctx.projectBuildsUrl);
+ });
+ });
+
/* Setup the initial state of the buttons */
for (var i in ctx.projectLayers){
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index d9ba687354..000e8038f6 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -179,14 +179,6 @@ function layerDetailsPageInit (ctx) {
/* re run the machinesTabShow to update the text */
targetsTabShow();
}
-
- $(".build-target-btn").unbind('click');
- $(".build-target-btn").click(function(){
- /* fire a build */
- var target = $(this).data('target-name');
- libtoaster.startABuild(ctx.projectBuildsUrl, libtoaster.ctx.projectId, target, null, null);
- window.location.replace(libtoaster.ctx.projectPageUrl);
- });
});
$("#machinestable").on('table-done', function(e, total, tableParams){
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 1af9c0bd90..92e3b5c667 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -438,7 +438,7 @@ class LayerRecipesTable(RecipesTable):
field_name="get_description_or_summary")
- build_recipe_template =''
+ build_recipe_template =''
self.add_column(title="Build recipe",
static_data_name="add-del-layers",
diff --git a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html
index d9ec3faec1..77c1b235b9 100644
--- a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html
@@ -1,6 +1,6 @@
-
+
+