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/layout/query-menu-item-directive.js

16 lines
376 B

angular.module('openproject.layout')
.directive('queryMenuItem', [
'$stateParams',
function($stateParams) {
return {
restrict: 'A',
scope: { queryId: '@' },
link: function(scope, element, attrs) {
scope.$on('$stateChangeSuccess', function() {
element.toggleClass('selected', scope.queryId === $stateParams.query_id);
});
}
};
}]);