diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-05-14 17:17:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-29 11:59:43 +0100 |
commit | 5da543c7b5cd565eed285a5015b1cafdc71ddb83 (patch) | |
tree | c58c84a81321b9caf8ea4ff2db485bae01c8d033 /bitbake | |
parent | b8caddb57ae3a4d0affd54a6d43bb9eace556921 (diff) | |
download | poky-5da543c7b5cd565eed285a5015b1cafdc71ddb83.tar.gz |
bitbake: toaster: Fix build button current project race
Make sure the current project value is set before we check to see if the
project is buildable. Also update the blacklist url patterns where we
aren't displaying the button.
[YOCTO #7739]
(Bitbake rev: e169ed5cf190af62586f3e1c6ed6db6120406e05)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/base.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js index c4c96c80e6..ccc23e0e60 100644 --- a/bitbake/lib/toaster/toastergui/static/js/base.js +++ b/bitbake/lib/toaster/toastergui/static/js/base.js | |||
@@ -6,11 +6,13 @@ function basePageInit (ctx) { | |||
6 | /* Hide the button if we're on the project,newproject or importlyaer page | 6 | /* Hide the button if we're on the project,newproject or importlyaer page |
7 | * or if there are no projects yet defined | 7 | * or if there are no projects yet defined |
8 | */ | 8 | */ |
9 | if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){ | 9 | if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d$|importlayer$') > 0){ |
10 | newBuildButton.hide(); | 10 | newBuildButton.hide(); |
11 | return; | 11 | return; |
12 | } | 12 | } |
13 | 13 | ||
14 | var currentProjectId = libtoaster.ctx.projectId; | ||
15 | |||
14 | /* Hide the change project icon when there is only one project */ | 16 | /* Hide the change project icon when there is only one project */ |
15 | if (ctx.numProjects == 1){ | 17 | if (ctx.numProjects == 1){ |
16 | $('#project .icon-pencil').hide(); | 18 | $('#project .icon-pencil').hide(); |
@@ -21,7 +23,6 @@ function basePageInit (ctx) { | |||
21 | _checkProjectBuildable() | 23 | _checkProjectBuildable() |
22 | _setupNewBuildButton(); | 24 | _setupNewBuildButton(); |
23 | 25 | ||
24 | var currentProjectId = libtoaster.ctx.projectId; | ||
25 | 26 | ||
26 | function _checkProjectBuildable(){ | 27 | function _checkProjectBuildable(){ |
27 | if (currentProjectId == undefined) | 28 | if (currentProjectId == undefined) |