Implement sorting of attributes group 'other'

pull/2099/head
Hagen Schink 10 years ago
parent 1b14678140
commit 65a365c34c
  1. 9
      app/assets/javascripts/angular/work_packages/controllers/details-tab-overview-controller.js
  2. 2
      app/assets/javascripts/angular/work_packages/controllers/index.js

@ -107,6 +107,15 @@ module.exports = function($scope,
group.attributes = attributesWithValues;
});
// The loops before overwrite the attributes array of group 'other'. Thus,
// to get the current values of that array, I need to get that array again.
otherAttributes = WorkPackagesOverviewService.getGroupAttributesForGroupedAttributes('other', $scope.groupedAttributes);
// Sorting the 'other' group is an acutal requirement. So, check if the
// requirement has changed before removing this code!
otherAttributes.sort(function(a, b) {
return a.label.toLowerCase().localeCompare(b.label.toLowerCase());
});
})();
function getWorkPackageProperty(property) {

@ -35,7 +35,7 @@ angular.module('openproject.workPackages.controllers')
.controller('DetailsTabOverviewController', [
'$scope',
'I18n',
'ConfigurationService',
'WorkPackagesOverviewService',
'TEXT_TYPE',
'VERSION_TYPE',
'CATEGORY_TYPE',

Loading…
Cancel
Save