Give filter directive its own scope and overwrite isLoading

pull/1065/head
Till Breuer 11 years ago
parent 8e82b6e0f8
commit eab91db98a
  1. 4
      app/assets/javascripts/angular/directives/work_packages/query-filter-directive.js

@ -4,7 +4,9 @@ angular.module('openproject.workPackages.directives')
return {
restrict: 'A',
scope: true,
link: function(scope, element, attributes) {
scope.isLoading = false; // don't shadow isLoading as its used for a different purpose in this context
scope.showValueOptionsAsSelect = ['list', 'list_optional', 'list_status', 'list_subprojects', 'list_model'].indexOf(scope.query.getFilterType(scope.filter.name)) !== -1;
@ -50,7 +52,7 @@ angular.module('openproject.workPackages.directives')
function addStandardOptions(options) {
if (scope.filter.getModelName() === 'user') {
options.unshift(['<< ' + scope.I18n.t('js.label_me') + ' >>', 'me']);
options.unshift(['<< ' + I18n.t('js.label_me') + ' >>', 'me']);
}
return options;

Loading…
Cancel
Save