Merge pull request #1980 from 0xF013/feature/15606-sorting-by-wp-id-not-displayed-in-modal

pull/1987/head
Hagen Schink 10 years ago
commit a35a8640b4
  1. 10
      app/assets/javascripts/angular/controllers/dialogs/columns.js

@ -50,10 +50,12 @@ angular.module('openproject.workPackages.controllers')
this.closeMe = columnsModal.deactivate;
$scope.getObjectsData = function(term, result) {
// Note: This relies on the columns having been cached in the service so they can be instantly available.
var filtered = $filter('filter')($scope.availableColumnsData, {label: term});
sorted = $filter('orderBy')(filtered, 'label');
var filtered = $filter('filter')($scope.availableColumnsData.filter(function(column) {
//Note: very special case; if such columns shall multiple, we better add a field
// to the query model hash of available columns
return column.id != "id";
}), {label: term});
var sorted = $filter('orderBy')(filtered, 'label');
return result(sorted);
};

Loading…
Cancel
Save