From: Belen Barros Pena Date: Wed, 3 Dec 2014 13:53:34 +0000 (+0000) Subject: toaster: base Only show change project icon when > one project X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e354a40d7dbcd85fea9d37d3983428e4470df2dd;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git toaster: base Only show change project icon when > one project 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 --- diff --git a/lib/toaster/toastergui/static/js/base.js b/lib/toaster/toastergui/static/js/base.js index fac59e64589..619ad287c44 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");