From 160563532f87bd901e1cc6972fe238be87a8b63c Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Thu, 11 Jun 2015 15:00:08 +0100 Subject: bitbake: toaster: refactor the builds pages Taking out the managed mode-specific bits in build-related pages, as there is always only one mode available. Also refactors the build pages in order to always display Build objects instead of BuildRequest objects. (Bitbake rev: 6e46e1e3882b9770872d8a0bb459bc7d5d6bfed3) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/projectapp.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/static/js/projectapp.js') diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index b2e65c5bb5..40e2e1fffa 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js @@ -429,13 +429,17 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc */ $scope.validateData = function () { - if ($scope.layers.length === 0) { + if ($scope.project.release) { + if ($scope.layers.length === 0) { $scope.layeralert = $scope.displayAlert($scope.zone1alerts, "You need to add some layers to this project. View all layers available in Toaster or import a layer"); - } else { - if ($scope.layeralert !== undefined) { - $scope.layeralert.close(); - $scope.layeralert = undefined; + } else { + if ($scope.layeralert !== undefined) { + $scope.layeralert.close(); + $scope.layeralert = undefined; + } } + } else { + $scope.layeralert = $scope.displayAlert($scope.zone1alerts, "This project is not set to run builds."); } }; -- cgit v1.2.3-54-g00ecf