bitbake: toastergui: Change build button popover to a build-button

To share the build-button mechanism from the pop over and project
topbar build button we now use a build-button class to reference them
and share the event handlers.

(Bitbake rev: e3c6a00b848a6f147e93c8da46b8a3516499fde8)

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>
This commit is contained in:
Michael Wood
2015-07-31 15:09:18 +03:00
committed by Richard Purdie
parent 10ffe1b8cc
commit c385f1551b
2 changed files with 11 additions and 8 deletions

View File

@@ -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(){

View File

@@ -143,8 +143,8 @@
<h6>Recipe(s):</h6>
<form>
<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/>
<div>
<button class="btn btn-primary" id="build-button" disabled>Build</button>
<div class="row-fluid">
<button class="btn btn-primary build-button" disabled>Build</button>
</div>
</form>
</li>