diff options
| author | Michael Wood <michael.g.wood@intel.com> | 2015-07-31 15:09:18 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-01 11:26:12 +0100 |
| commit | c385f1551b5276f2f9aab657dfc46ae5c9bde485 (patch) | |
| tree | e446b69215f7f8be64bf19c9957187f615fd39de | |
| parent | 10ffe1b8cc1fad3fb093fcf127b530011ecd3de4 (diff) | |
| download | poky-c385f1551b5276f2f9aab657dfc46ae5c9bde485.tar.gz | |
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>
| -rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/base.js | 15 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/base.html | 4 |
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> |
