diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index 26e054dc23..0b6e0126dd 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js @@ -484,11 +484,13 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc layerAdd: selectedArray.join(","), } }).then(function () { + $scope.adjustMostBuiltItems(selectedArray.length); $scope.layerAddName = undefined; }); }); } else { + $scope.adjustMostBuiltItems(1); $scope._makeXHRCall({ method: "POST", url: $scope.urls.xhr_edit, data: { @@ -503,6 +505,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc }; $scope.layerDel = function(id) { + $scope.adjustMostBuiltItems(-1); $scope._makeXHRCall({ method: "POST", url: $scope.urls.xhr_edit, data: { @@ -511,6 +514,14 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc }); }; + $scope.adjustMostBuiltItems = function(listDelta) { + $scope.layerCount += listDelta; + $scope.mutedtargets = ($scope.layerCount == 0 ? "muted" : ""); + }; + +/* +*/ + /** * Verifies if a project settings change would trigger layer updates. If user confirmation is needed, @@ -799,6 +810,14 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc return keys.length === 0; }; + $scope.disableBuildCheckbox = function(t) { + if ( $scope.layerCount == 0 ) { + $scope.mostBuiltTargets[t] = 0; + return true; + }; + return false; + } + $scope.buildSelectedTargets = function () { var keys = Object.keys($scope.mostBuiltTargets); keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e; }); diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 40048c2f2c..9d51a57208 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -328,10 +328,10 @@ vim: expandtab tabstop=2

Most built targets

-