summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerBtn.js13
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js8
2 files changed, 13 insertions, 8 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){
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) {
179 /* re run the machinesTabShow to update the text */ 179 /* re run the machinesTabShow to update the text */
180 targetsTabShow(); 180 targetsTabShow();
181 } 181 }
182
183 $(".build-target-btn").unbind('click');
184 $(".build-target-btn").click(function(){
185 /* fire a build */
186 var target = $(this).data('target-name');
187 libtoaster.startABuild(ctx.projectBuildsUrl, libtoaster.ctx.projectId, target, null, null);
188 window.location.replace(libtoaster.ctx.projectPageUrl);
189 });
190 }); 182 });
191 183
192 $("#machinestable").on('table-done', function(e, total, tableParams){ 184 $("#machinestable").on('table-done', function(e, total, tableParams){