]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: Fix build button current project race
authorMichael Wood <michael.g.wood@intel.com>
Thu, 14 May 2015 16:17:51 +0000 (17:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 May 2015 10:59:43 +0000 (11:59 +0100)
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>
bitbake/lib/toaster/toastergui/static/js/base.js

index c4c96c80e6d145de124218c7a6e01f1350f5cfb7..ccc23e0e606222015fd1f116662fe30ae93aaa10 100644 (file)
@@ -6,11 +6,13 @@ function basePageInit (ctx) {
   /* Hide the button if we're on the project,newproject or importlyaer page
    * or if there are no projects yet defined
    */
-  if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){
+  if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d$|importlayer$') > 0){
       newBuildButton.hide();
       return;
   }
 
+  var currentProjectId = libtoaster.ctx.projectId;
+
   /* Hide the change project icon when there is only one project */
   if (ctx.numProjects == 1){
      $('#project .icon-pencil').hide(); 
@@ -21,7 +23,6 @@ function basePageInit (ctx) {
   _checkProjectBuildable()
   _setupNewBuildButton();
 
-  var currentProjectId = libtoaster.ctx.projectId;
 
   function _checkProjectBuildable(){
     if (currentProjectId == undefined)