Revert "[accessibility] replacing background image with img-tags"

This reverts commit 6a645bfe9a.
pull/41/head
Romano Licker 13 years ago
parent 6a645bfe9a
commit 44ac9af7fe
  1. 14
      app/helpers/application_helper.rb
  2. 11
      app/views/layouts/base.rhtml
  3. 3
      lib/redmine.rb
  4. 18
      public/stylesheets/application.css

@ -940,7 +940,7 @@ module ApplicationHelper
# Expands the current menu item using JavaScript based on the params
def expand_current_menu
current_menu_class =
case
case
when params[:controller] == "timelog"
"reports"
when params[:controller] == 'reports'
@ -961,7 +961,7 @@ module ApplicationHelper
params[:controller]
end
javascript_tag("jQuery.menu_expand({ menuItem: '.#{current_menu_class}' });")
end
@ -975,10 +975,6 @@ module ApplicationHelper
split_top_menu_into_main_or_more_menus[:more]
end
def home_menu_item
split_top_menu_into_main_or_more_menus[:home]
end
def help_menu_item
split_top_menu_into_main_or_more_menus[:help]
end
@ -989,14 +985,11 @@ module ApplicationHelper
items_for_main_level = []
items_for_more_level = []
help_menu = nil
home_menu = nil
menu_items_for(:top_menu) do |item|
if item.name == :my_page
if item.name == :home || item.name == :my_page
items_for_main_level << item
elsif item.name == :help
help_menu = item
elsif item.name == :home
home_menu = item
elsif item.name == :projects
# Remove, present in layout
else
@ -1006,7 +999,6 @@ module ApplicationHelper
@top_menu_split = {
:main => items_for_main_level,
:more => items_for_more_level,
:home => home_menu,
:help => help_menu
}
end

@ -45,9 +45,6 @@
</div>
<ul id="account-nav">
<li>
<%= link_to(image_tag('icon_home.png', :alt => home_menu_item.caption, :title => home_menu_item.caption), home_menu_item.url, {:class => "home"}) %>
</li>
<% main_top_menu_items.each do |item| %>
<%= render_menu_node(item) %>
<% end %>
@ -70,9 +67,7 @@
</ul>
</li>
<% end %>
<li>
<%= link_to(image_tag('icon_help.png', :alt => help_menu_item.caption, :title => help_menu_item.caption), help_menu_item.url, {:class => "help"}) %>
</li>
<%= render_menu_node(help_menu_item) %>
<li class="drop-down last-child">
<% unless User.current.logged? %>
<%= link_to l(:label_login), {:controller => 'account', :action => 'login'}, :class => 'login' %>
@ -96,7 +91,7 @@
<%= page_header_title %>
</div>
</div>
<% main_menu = render_main_menu(@project) %>
<% if (side_displayed = has_content?(:sidebar) || has_content?(:main_menu) || !main_menu.blank?) %>
<% display_sidebar = true %>
@ -110,7 +105,7 @@
<%= yield :main_menu %>
<% if display_sidebar %>
<!-- Sidebar -->
<div id="sidebar">
<div id="sidebar">
<%= yield :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>

@ -162,8 +162,7 @@ Redmine::AccessControl.map do |map|
end
Redmine::MenuManager.map :top_menu do |menu|
# For accessibility purposes this menu is partly rebuild in layouts/base.rhtml
menu.push :home, :home
menu.push :home, :home_path
menu.push :my_page, { :controller => 'my', :action => 'page' }, :if => Proc.new { User.current.logged? }
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural # menu-item projects will be overwritten by base.rhtml
menu.push :administration, { :controller => 'admin', :action => 'projects' }, :if => Proc.new { User.current.admin? }, :last => true

@ -1222,27 +1222,21 @@ a:hover {
font-weight:bold;
color:#FFFFFF;
}
li a.home {
text-indent:-999em;
width:20px;
height:43px;
}
li a.home img {
position:relative;
top: 16px;
left: 3px;
background:url(../images/icon_home.png) no-repeat 50% 50%;
}
li a.help {
text-indent:-999em;
width:20px;
height:43px;
background:url(../images/icon_help.png) no-repeat 50% 50%;
}
li a.help img {
position:relative;
top: 14px;
left: 6px;
li a.help:hover {
background-image:url(../images/icon_help_grey.png);
}
#header li.drop-down.open > a {
background:#FFFFFF url(../images/arrow-down-grey.png) no-repeat right center;

Loading…
Cancel
Save