fix sorting by wp id not displayed in modal

pull/1980/head
Mihail Maxacov 10 years ago
parent 12d8f452d6
commit 397cee3f8d
  1. 10
      app/assets/javascripts/angular/controllers/dialogs/columns.js

@ -50,10 +50,12 @@ angular.module('openproject.workPackages.controllers')
this.closeMe = columnsModal.deactivate; this.closeMe = columnsModal.deactivate;
$scope.getObjectsData = function(term, result) { $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.filter(function(column) {
var filtered = $filter('filter')($scope.availableColumnsData, {label: term}); //Note: very special case; if such columns shall multiple, we better add a field
sorted = $filter('orderBy')(filtered, 'label'); // to the query model hash of available columns
return column.id != "id";
}), {label: term});
var sorted = $filter('orderBy')(filtered, 'label');
return result(sorted); return result(sorted);
}; };

Loading…
Cancel
Save