[bitbake-devel] [PATCH 06/11] toaster: base Only show change project icon when > one project

Alex DAMIAN alexandru.damian at intel.com
Wed Dec 10 15:12:11 UTC 2014


From: Belen Barros Pena <belen.barros.pena at intel.com>

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 at intel.com>
---
 lib/toaster/toastergui/static/js/base.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/toaster/toastergui/static/js/base.js b/lib/toaster/toastergui/static/js/base.js
index fac59e6..619ad28 100644
--- a/lib/toaster/toastergui/static/js/base.js
+++ b/lib/toaster/toastergui/static/js/base.js
@@ -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");
 
-- 
1.9.1




More information about the bitbake-devel mailing list