From 08e5a49afbc4c2b777be61785ecd7854837d6250 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Tue, 20 Jan 2015 16:56:35 +0000 Subject: bitbake: toastegui: project page build selected targets Fixing the action on the "Build selected targets" button. Remove "build-button" duplicate id from the build page. [YOCTO #7047] (Bitbake rev: 8278d7b15b58484af93d952e594f29dabb9200a9) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../lib/toaster/toastergui/static/js/projectapp.js | 25 +++++++++++++++++++--- .../lib/toaster/toastergui/templates/project.html | 6 +++--- 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'bitbake') 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 } $scope.buildExistingTarget = function(targets) { + $scope.buildTargetList(targets.map(function(v,i,a){return v.target})); + } + + $scope.buildTargetList = function(targetlist) { var oldTargetName = $scope.targetName; - $scope.targetName = targets.map(function(v,i,a){return v.target}).join(' '); + $scope.targetName = targetlist.join(' '); $scope.buildNamedTarget(); $scope.targetName = oldTargetName; } @@ -733,12 +737,27 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc angular.element(id+"-opposite").toggle(); } - $scope.selectedMostBuildTargets = function () { - keys = Object.keys($scope.mostBuiltTargets); + /** + * Functionality related to "Most build targets" + */ + + $scope.enableBuildSelectedTargets = function () { + var keys = Object.keys($scope.mostBuiltTargets); keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e }); return keys.length == 0; } + $scope.buildSelectedTargets = function () { + var keys = Object.keys($scope.mostBuiltTargets); + keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e }); + + $scope.buildTargetList(keys); + for (var i = 0; i < keys.length; i++) + { + $scope.mostBuiltTargets[keys[i]] = 0; + } + } + /** * Helper function to deal with error string recognition and manipulation */ diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 815c24c4b5..fe3bcf29e0 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -92,7 +92,7 @@ vim: expandtab tabstop=2
-
@@ -289,7 +289,7 @@ vim: expandtab tabstop=2
-
{% csrf_token %} @@ -306,7 +306,7 @@ vim: expandtab tabstop=2 - + -- cgit v1.2.3-54-g00ecf