]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: base Only show change project icon when > one project
authorBelen Barros Pena <belen.barros.pena@intel.com>
Wed, 3 Dec 2014 13:53:34 +0000 (13:53 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Fri, 12 Dec 2014 11:40:47 +0000 (11:40 +0000)
In the new build button, it only makes sense to change
the selected project when there is more than one project
in the Toaster instance. If the number of projects is 1,
we hide the change project icon.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
lib/toaster/toastergui/static/js/base.js

index fac59e64589dcadeb5b06c5a38218d06d2a3c3ed..619ad287c4402904aa8b84811de0a0374db64519 100644 (file)
@@ -11,6 +11,10 @@ function basePageInit (ctx) {
       return;
   }
 
+  /* Hide the change project icon when there is only one project */
+  if (ctx.numProjects == 1){
+     $('#project .icon-pencil').hide(); 
+  }
 
   newBuildButton.show().removeAttr("disabled");