|
|
@ -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); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|