|
@@ -42,7 +42,7 @@ function basePageInit(ctx) {
|
|
|
$(".build-target-input").length === 1) {
|
|
|
|
|
|
newBuildTargetInput = $("#new-build-button .build-target-input");
|
|
|
- newBuildTargetBuildBtn = $("#new-build-button .build-button");
|
|
|
+ newBuildTargetBuildBtn = $("#new-build-button").find(".build-button");
|
|
|
|
|
|
_setupNewBuildButton();
|
|
|
newBuildButton.show();
|
|
@@ -59,8 +59,9 @@ function basePageInit(ctx) {
|
|
|
$('#project .icon-pencil').hide();
|
|
|
}
|
|
|
|
|
|
- libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
|
|
|
- /* successfully selected a target */
|
|
|
+ /* If we have a project setup the typeahead */
|
|
|
+ if (selectedProject.projectTargetsUrl){
|
|
|
+ libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.projectTargetsUrl, { format: "json" }, function (item) {
|
|
|
selectedTarget = item;
|
|
|
newBuildTargetBuildBtn.removeAttr("disabled");
|
|
|
});
|
|
@@ -81,9 +82,11 @@ function basePageInit(ctx) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (!selectedTarget) {
|
|
|
- selectedTarget = { name: newBuildTargetInput.val() };
|
|
|
- }
|
|
|
+ /* We use the value of the input field so as to maintain any command also
|
|
|
+ * added e.g. core-image-minimal:clean
|
|
|
+ */
|
|
|
+ selectedTarget = { name: newBuildTargetInput.val() };
|
|
|
+
|
|
|
/* Fire off the build */
|
|
|
libtoaster.startABuild(selectedProject.projectBuildsUrl,
|
|
|
selectedProject.projectId, selectedTarget.name, function(){
|