summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/base.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index 864130def9..fac59e6458 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -3,10 +3,12 @@
3function basePageInit (ctx) { 3function basePageInit (ctx) {
4 4
5 var newBuildButton = $("#new-build-button"); 5 var newBuildButton = $("#new-build-button");
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 if (ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){ 7 * or if there are no projects yet defined
8 newBuildButton.hide(); 8 */
9 return; 9 if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){
10 newBuildButton.hide();
11 return;
10 } 12 }
11 13
12 14
@@ -17,6 +19,9 @@ function basePageInit (ctx) {
17 19
18 20
19 function _checkProjectBuildable(){ 21 function _checkProjectBuildable(){
22 if (ctx.projectId == undefined)
23 return;
24
20 libtoaster.getProjectInfo(ctx.projectInfoUrl, ctx.projectId, 25 libtoaster.getProjectInfo(ctx.projectInfoUrl, ctx.projectId,
21 function(data){ 26 function(data){
22 if (data.machine.name == undefined || data.layers.length == 0) { 27 if (data.machine.name == undefined || data.layers.length == 0) {