diff options
author | Belen Barros Pena <belen.barros.pena@intel.com> | 2015-03-19 14:29:58 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-24 22:54:37 +0000 |
commit | b4ffe490253108e7a009290474e206468255ce12 (patch) | |
tree | 6d5b465e35b1b4baf5b66e541af8b5a3df2832ad /lib/toaster/toastergui/static/js/projectapp.js | |
parent | 24d0938001da27c7ebcf36ce076f2aa58cbcf256 (diff) | |
download | bitbake-b4ffe490253108e7a009290474e206468255ce12.tar.gz |
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
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/static/js/projectapp.js')
-rw-r--r-- | lib/toaster/toastergui/static/js/projectapp.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/toaster/toastergui/static/js/projectapp.js b/lib/toaster/toastergui/static/js/projectapp.js index 40e764382..26e054dc2 100644 --- a/lib/toaster/toastergui/static/js/projectapp.js +++ b/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 += "<li><strong>"+addedLayers.length+"</strong> layer" + ((addedLayers.length>1)?"s":"") + " changed to the <strong> " + $scope.project.release.name + " </strong> branch: " + addedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; } if (deletedLayers.length > 0) { - alertText += "<li><strong>"+deletedLayers.length+"</strong> layer" + ((deletedLayers.length>1)?"s":"") + " deleted from the <strong> " + $scope.project.release.name + " </strong> branch: " + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; + alertText += "<li><strong>"+deletedLayers.length+"</strong> layer" + ((deletedLayers.length>1)?"s":"") + " deleted: " + deletedLayers.map(function (e) { return "<a href=\""+e.layerdetailurl+"\">"+e.name+"</a>"; }).join(", ") + "</li>"; } } |