summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/projectapp.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/projectapp.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/projectapp.js25
1 files changed, 22 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
index 74471a1a51..bee3c56be2 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js
@@ -337,8 +337,12 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
337 } 337 }
338 338
339 $scope.buildExistingTarget = function(targets) { 339 $scope.buildExistingTarget = function(targets) {
340 $scope.buildTargetList(targets.map(function(v,i,a){return v.target}));
341 }
342
343 $scope.buildTargetList = function(targetlist) {
340 var oldTargetName = $scope.targetName; 344 var oldTargetName = $scope.targetName;
341 $scope.targetName = targets.map(function(v,i,a){return v.target}).join(' '); 345 $scope.targetName = targetlist.join(' ');
342 $scope.buildNamedTarget(); 346 $scope.buildNamedTarget();
343 $scope.targetName = oldTargetName; 347 $scope.targetName = oldTargetName;
344 } 348 }
@@ -733,12 +737,27 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
733 angular.element(id+"-opposite").toggle(); 737 angular.element(id+"-opposite").toggle();
734 } 738 }
735 739
736 $scope.selectedMostBuildTargets = function () { 740 /**
737 keys = Object.keys($scope.mostBuiltTargets); 741 * Functionality related to "Most build targets"
742 */
743
744 $scope.enableBuildSelectedTargets = function () {
745 var keys = Object.keys($scope.mostBuiltTargets);
738 keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e }); 746 keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
739 return keys.length == 0; 747 return keys.length == 0;
740 } 748 }
741 749
750 $scope.buildSelectedTargets = function () {
751 var keys = Object.keys($scope.mostBuiltTargets);
752 keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
753
754 $scope.buildTargetList(keys);
755 for (var i = 0; i < keys.length; i++)
756 {
757 $scope.mostBuiltTargets[keys[i]] = 0;
758 }
759 }
760
742 /** 761 /**
743 * Helper function to deal with error string recognition and manipulation 762 * Helper function to deal with error string recognition and manipulation
744 */ 763 */