OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/assets/javascripts/angular/directives/components/toggled-multiselect-directi...

22 lines
622 B

// TODO move to UI components
angular.module('openproject.uiComponents')
.directive('toggledMultiselect', ['WorkPackagesHelper', function(WorkPackagesHelper){
return {
restrict: 'EA',
replace: true,
scope: {
name: '=',
values: '=',
availableFilterValues: '=',
},
templateUrl: '/templates/components/toggled_multiselect.html',
link: function(scope, element, attributes){
scope.toggleMultiselect = function(){
scope.isMultiselect = !scope.isMultiselect;
};
scope.isMultiselect = (scope.values !== undefined && scope.values.length > 1);
}
};
}]);