Make the Gantt zoom images more accessible

* Correct the alt text
* Add text links next to the images
* Size the images in em to support browser scaling

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3757 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2010-05-26 22:48:35 +00:00
parent ab4bdc379e
commit 6e529f82a7
2 changed files with 10 additions and 4 deletions

View File

@ -235,23 +235,27 @@ module IssuesHelper
end end
def gantt_zoom_link(gantt, in_or_out) def gantt_zoom_link(gantt, in_or_out)
img_attributes = {:style => 'height:1.4em; width:1.4em; margin-left: 3px;'} # em for accessibility
case in_or_out case in_or_out
when :in when :in
if gantt.zoom < 4 if gantt.zoom < 4
link_to_remote(image_tag('zoom_in.png'), link_to_remote(l(:text_zoom_in) + image_tag('zoom_in.png', img_attributes.merge(:alt => l(:text_zoom_in))),
{:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :update => 'content'}, {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :update => 'content'},
{:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1)))}) {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1)))})
else else
image_tag('zoom_in_g.png') l(:text_zoom_in) +
image_tag('zoom_in_g.png', img_attributes.merge(:alt => l(:text_zoom_in)))
end end
when :out when :out
if gantt.zoom > 1 if gantt.zoom > 1
link_to_remote(image_tag('zoom_out.png'), link_to_remote(l(:text_zoom_out) + image_tag('zoom_out.png', img_attributes.merge(:alt => l(:text_zoom_out))),
{:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :update => 'content'}, {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :update => 'content'},
{:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1)))}) {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1)))})
else else
image_tag('zoom_out_g.png') l(:text_zoom_out) +
image_tag('zoom_out_g.png', img_attributes.merge(:alt => l(:text_zoom_out)))
end end
end end
end end

View File

@ -871,6 +871,8 @@ en:
text_wiki_page_destroy_children: "Delete child pages and all their descendants" text_wiki_page_destroy_children: "Delete child pages and all their descendants"
text_wiki_page_reassign_children: "Reassign child pages to this parent page" text_wiki_page_reassign_children: "Reassign child pages to this parent page"
text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?"
text_zoom_in: Zoom in
text_zoom_out: Zoom out
default_role_manager: Manager default_role_manager: Manager
default_role_developper: Developer default_role_developper: Developer