summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-08-06 19:23:49 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-06 16:04:50 -0500
commit58197f345b203f55de202f8c91129e3d381359ed (patch)
treefd9aa5eb5cfe8927efe073ba750b6d475fbc2d55 /bitbake/lib/toaster/toastergui/static/js/layerBtn.js
parenta65099eec3df428f33308a12611262f00ba90f56 (diff)
downloadpoky-58197f345b203f55de202f8c91129e3d381359ed.tar.gz
bitbake: toastergui: layerBtn Fix build trigger mechanism
The new project page is no longer responsible for triggering the build so add a handler for this in layerBtn which is used in the layerdetails and layers pages. This also removes the conflicting and redundant handler for this in the layerdetails. (Bitbake rev: b4c389443bdd121121fd1d1a9006a9f1f63f186f) 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>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/layerBtn.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerBtn.js13
1 files changed, 13 insertions, 0 deletions
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) {
55 }); 55 });
56 }); 56 });
57 57
58 $(".build-recipe-btn").unbind('click');
59 $(".build-recipe-btn").click(function(e){
60 e.preventDefault();
61 var recipe = $(this).data('recipe-name');
62
63 libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl,
64 libtoaster.ctx.projectId, recipe,
65 function(){
66 /* Success */
67 window.location.replace(libtoaster.ctx.projectBuildsUrl);
68 });
69 });
70
58 /* Setup the initial state of the buttons */ 71 /* Setup the initial state of the buttons */
59 72
60 for (var i in ctx.projectLayers){ 73 for (var i in ctx.projectLayers){