From 792716a385c8c2bcd2a89c8978d4fc988d1fed5c Mon Sep 17 00:00:00 2001 From: Belen Barros Pena Date: Thu, 19 Mar 2015 14:29:58 +0000 Subject: bitbake: toastergui: changes to release change notifications * Remove the branch name from the list of the layers deleted (it does not apply). * In the modal dialog that warns you before layer deletion, use the release description instead of the release name (Bitbake rev: b4ffe490253108e7a009290474e206468255ce12) Signed-off-by: Belen Barros Pena Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/projectapp.js | 8 ++++++-- bitbake/lib/toaster/toastergui/templates/project.html | 6 +++--- 2 files changed, 9 insertions(+), 5 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 40e7643822..26e054dc23 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js @@ -532,9 +532,10 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc // activate modal var modalInstance = $modal.open({ templateUrl: 'change_version_modal', - controller: function ($scope, $modalInstance, items, releaseName) { + controller: function ($scope, $modalInstance, items, releaseName, releaseDescription) { $scope.items = items; $scope.releaseName = releaseName; + $scope.releaseDescription = releaseDescription; $scope.ok = function() { $modalInstance.close(); @@ -552,6 +553,9 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc releaseName: function () { return $scope.releases.filter(function (e) { if (e.id == $scope.projectVersion) return e;})[0].name; }, + releaseDescription: function () { + return $scope.releases.filter(function (e) { if (e.id == $scope.projectVersion) return e;})[0].description; + }, } }); @@ -639,7 +643,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc alertText += "
  • "+addedLayers.length+" layer" + ((addedLayers.length>1)?"s":"") + " changed to the " + $scope.project.release.name + " branch: " + addedLayers.map(function (e) { return ""+e.name+""; }).join(", ") + "
  • "; } if (deletedLayers.length > 0) { - alertText += "
  • "+deletedLayers.length+" layer" + ((deletedLayers.length>1)?"s":"") + " deleted from the " + $scope.project.release.name + " branch: " + deletedLayers.map(function (e) { return ""+e.name+""; }).join(", ") + "
  • "; + alertText += "
  • "+deletedLayers.length+" layer" + ((deletedLayers.length>1)?"s":"") + " deleted: " + deletedLayers.map(function (e) { return ""+e.name+""; }).join(", ") + "
  • "; } } diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 65c0919bc9..d208bf8cfb 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -77,14 +77,14 @@ vim: expandtab tabstop=2