Fixed select2 filter available values.

pull/1302/head^2
Richard 11 years ago
parent 812bf8a490
commit e53f9a4422
  1. 5
      app/assets/javascripts/angular/controllers/dialogs/columns.js

@ -38,18 +38,19 @@ angular.module('openproject.workPackages.controllers')
.controller('ColumnsModalController', ['$scope',
'$timeout',
'$filter',
'columnsModal',
'QueryService',
'WorkPackageService',
'WorkPackagesTableService',
function($scope, $timeout, columnsModal, QueryService, WorkPackageService, WorkPackagesTableService) {
function($scope, $timeout, $filter, columnsModal, QueryService, WorkPackageService, WorkPackagesTableService) {
this.name = 'Columns';
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.
result($scope.availableColumnsData);
result($filter('filter')($scope.availableColumnsData, {label: term}));
};
// Data conversion for select2

Loading…
Cancel
Save