summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/base.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index c99f8cdc54..dda2549698 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -42,7 +42,7 @@ function basePageInit(ctx) {
42 $(".build-target-input").length === 1) { 42 $(".build-target-input").length === 1) {
43 43
44 newBuildTargetInput = $("#new-build-button .build-target-input"); 44 newBuildTargetInput = $("#new-build-button .build-target-input");
45 newBuildTargetBuildBtn = $("#new-build-button .build-button"); 45 newBuildTargetBuildBtn = $("#new-build-button").find(".build-button");
46 46
47 _setupNewBuildButton(); 47 _setupNewBuildButton();
48 newBuildButton.show(); 48 newBuildButton.show();
@@ -59,8 +59,9 @@ function basePageInit(ctx) {
59 $('#project .icon-pencil').hide(); 59 $('#project .icon-pencil').hide();
60 } 60 }
61 61
62 libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) { 62 /* If we have a project setup the typeahead */
63 /* successfully selected a target */ 63 if (selectedProject.projectTargetsUrl){
64 libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
64 selectedTarget = item; 65 selectedTarget = item;
65 newBuildTargetBuildBtn.removeAttr("disabled"); 66 newBuildTargetBuildBtn.removeAttr("disabled");
66 }); 67 });
@@ -81,9 +82,11 @@ function basePageInit(ctx) {
81 return; 82 return;
82 } 83 }
83 84
84 if (!selectedTarget) { 85 /* We use the value of the input field so as to maintain any command also
85 selectedTarget = { name: newBuildTargetInput.val() }; 86 * added e.g. core-image-minimal:clean
86 } 87 */
88 selectedTarget = { name: newBuildTargetInput.val() };
89
87 /* Fire off the build */ 90 /* Fire off the build */
88 libtoaster.startABuild(selectedProject.projectBuildsUrl, 91 libtoaster.startABuild(selectedProject.projectBuildsUrl,
89 selectedProject.projectId, selectedTarget.name, function(){ 92 selectedProject.projectId, selectedTarget.name, function(){