Theme && Accessibility check

pull/5301/head
Henriette Dinger 8 years ago committed by Oliver Günther
parent 8ed5f9a7c0
commit 91877f5857
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 2
      app/assets/stylesheets/layout/_main_menu.sass
  2. 4
      app/assets/stylesheets/layout/_top_menu.sass
  3. 3
      config/locales/en.yml
  4. 4
      frontend/app/init-app.js
  5. 10
      frontend/app/layout/controllers/main-menu-controller.js
  6. 1
      lib/redmine/menu_manager/top_menu_helper.rb

@ -68,7 +68,7 @@ $toggler-width: 40px
text-decoration: none
&:hover, &.selected, &.selected + a
@include varprop(background-color, main-menu-bg-selected-background)
@include varprop(background, main-menu-bg-selected-background)
@include varprop(color, main-menu-selected-font-color)
font-weight: bold

@ -201,6 +201,10 @@
margin-left: $main-menu-width
width: calc(100% - #{$main-menu-width})
#wrapper.nosidebar #top-menu
margin-left: 0
width: initial
.top-menu-search
display: inline-block
&:not(.-collapsed) > div

@ -1923,7 +1923,8 @@ en:
session: "Session"
brute_force_prevention: "Automated user blocking"
show_hide_project_menu: "Expand/Collapse project menu"
show_project_menu: "Expand project menu"
hide_project_menu: "Collapse project menu"
status_active: "active"
status_invited: invited

@ -109,8 +109,8 @@ opApp
$rootScope.DOUBLE_LEFT_CURLY_BRACE = ExpressionService.UNESCAPED_EXPRESSION;
$rootScope.showNavigation =
!($window.sessionStorage.getItem('openproject:navigation-toggle') !==
'expanded');
$window.sessionStorage.getItem('openproject:navigation-toggle') !==
'collapsed';
TimezoneService.setupLocale();
KeyboardShortcutService.activate();

@ -34,6 +34,7 @@ module.exports = function($rootScope, $window) {
menuList = hideSubMenuEntries();
} else {
showSubMenuEntries(menuList);
focusFirstEntry();
}
$rootScope.showNavigation = !$rootScope.showNavigation;
$rootScope.$broadcast('openproject.layout.navigationToggled', $rootScope.showNavigation);
@ -60,3 +61,12 @@ function toggleMenus(togglers) {
jQuery(this).trigger('click');
});
}
function focusFirstEntry() {
var element = jQuery('#main-menu .main-item-wrapper > a')[0];
if (element) {
window.setTimeout(function(){
element.focus();
}, 100);
}
}

@ -126,6 +126,7 @@ module Redmine::MenuManager::TopMenuHelper
"ng-controller" => 'MainMenuController as mainMenu') do
link_to '',
'',
"ng-attr-title" => "{{ showNavigation ? '#{l(:hide_project_menu)}' : '#{l(:show_project_menu)}' }}".html_safe,
"ng-class" => "{ 'show icon-hamburger': !showNavigation, 'icon-arrow-left2' : showNavigation }",
class: 'navigation-toggler',
"ng-click" => 'mainMenu.toggleNavigation()'

Loading…
Cancel
Save