diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/projectapp.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/projectapp.js | 19 |
1 files changed, 19 insertions, 0 deletions
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 | |||
484 | layerAdd: selectedArray.join(","), | 484 | layerAdd: selectedArray.join(","), |
485 | } | 485 | } |
486 | }).then(function () { | 486 | }).then(function () { |
487 | $scope.adjustMostBuiltItems(selectedArray.length); | ||
487 | $scope.layerAddName = undefined; | 488 | $scope.layerAddName = undefined; |
488 | }); | 489 | }); |
489 | }); | 490 | }); |
490 | } | 491 | } |
491 | else { | 492 | else { |
493 | $scope.adjustMostBuiltItems(1); | ||
492 | $scope._makeXHRCall({ | 494 | $scope._makeXHRCall({ |
493 | method: "POST", url: $scope.urls.xhr_edit, | 495 | method: "POST", url: $scope.urls.xhr_edit, |
494 | data: { | 496 | data: { |
@@ -503,6 +505,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
503 | }; | 505 | }; |
504 | 506 | ||
505 | $scope.layerDel = function(id) { | 507 | $scope.layerDel = function(id) { |
508 | $scope.adjustMostBuiltItems(-1); | ||
506 | $scope._makeXHRCall({ | 509 | $scope._makeXHRCall({ |
507 | method: "POST", url: $scope.urls.xhr_edit, | 510 | method: "POST", url: $scope.urls.xhr_edit, |
508 | data: { | 511 | data: { |
@@ -511,6 +514,14 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc | |||
511 | }); | 514 | }); |
512 | }; | 515 | }; |
513 | 516 | ||
517 | $scope.adjustMostBuiltItems = function(listDelta) { | ||
518 | $scope.layerCount += listDelta; | ||
519 | $scope.mutedtargets = ($scope.layerCount == 0 ? "muted" : ""); | ||
520 | }; | ||
521 | |||
522 | /* | ||
523 | */ | ||
524 | |||
514 | 525 | ||
515 | /** | 526 | /** |
516 | * Verifies if a project settings change would trigger layer updates. If user confirmation is needed, | 527 | * 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 | |||
799 | return keys.length === 0; | 810 | return keys.length === 0; |
800 | }; | 811 | }; |
801 | 812 | ||
813 | $scope.disableBuildCheckbox = function(t) { | ||
814 | if ( $scope.layerCount == 0 ) { | ||
815 | $scope.mostBuiltTargets[t] = 0; | ||
816 | return true; | ||
817 | }; | ||
818 | return false; | ||
819 | } | ||
820 | |||
802 | $scope.buildSelectedTargets = function () { | 821 | $scope.buildSelectedTargets = function () { |
803 | var keys = Object.keys($scope.mostBuiltTargets); | 822 | var keys = Object.keys($scope.mostBuiltTargets); |
804 | keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e; }); | 823 | keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e; }); |