Highlight main menu item if no query has been selected

pull/1494/head
Till Breuer 11 years ago
parent 60ab0e471e
commit b16b23bf88
  1. 2
      app/assets/javascripts/angular/layout/query-menu-item-directive.js
  2. 3
      lib/redmine.rb

@ -8,7 +8,7 @@ angular.module('openproject.layout')
scope: { queryId: '@' },
link: function(scope, element, attrs) {
scope.$on('$stateChangeSuccess', function() {
element.toggleClass('selected', scope.queryId === $stateParams.query_id);
element.toggleClass('selected', (scope.queryId || null) === $stateParams.query_id);
});
}
};

@ -300,7 +300,8 @@ Redmine::MenuManager.map :project_menu do |menu|
caption: :label_work_package_plural,
html: {
class: "icon2 icon-copy",
"data-ui-route" => ''
"data-ui-route" => '',
query_menu_item: 'query_menu_item'
}
menu.push :new_work_package, { :controller => '/work_packages', :action => 'new'},

Loading…
Cancel
Save