summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js15
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html4
2 files changed, 11 insertions, 8 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(){
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index 4c6676c6e7..4bef04f90e 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -143,8 +143,8 @@
143 <h6>Recipe(s):</h6> 143 <h6>Recipe(s):</h6>
144 <form> 144 <form>
145 <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/> 145 <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
146 <div> 146 <div class="row-fluid">
147 <button class="btn btn-primary" id="build-button" disabled>Build</button> 147 <button class="btn btn-primary build-button" disabled>Build</button>
148 </div> 148 </div>
149 </form> 149 </form>
150 </li> 150 </li>