Add RTL support to the context menu. #6012

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4014 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2010-08-22 19:12:21 +00:00
parent fc9b984cc1
commit 05527be943
4 changed files with 15 additions and 4 deletions

View File

@ -737,6 +737,11 @@ module ApplicationHelper
javascript_include_tag('context_menu') +
stylesheet_link_tag('context_menu')
end
if l(:direction) == 'rtl'
content_for :header_tags do
stylesheet_link_tag('context_menu_rtl')
end
end
@context_menu_included = true
end
javascript_tag "new ContextMenu('#{ url_for(url) }')"

View File

@ -128,6 +128,7 @@
<%= stylesheet_link_tag 'scm' %>
<%= javascript_include_tag 'context_menu' %>
<%= stylesheet_link_tag 'context_menu' %>
<%= stylesheet_link_tag 'context_menu_rtl' if l(:direction) == 'rtl' %>
<% end %>
<div id="context-menu" style="display: none;"></div>
<%= javascript_tag "new ContextMenu('#{issues_context_menu_path}')" %>

View File

@ -0,0 +1,9 @@
#context-menu li.folder ul { left:auto; right:168px; }
#context-menu li.folder>ul { left:auto; right:148px; }
#context-menu li a.submenu { background:url("../images/bullet_arrow_left.png") left no-repeat; }
#context-menu a {
background-position: 100% 40%;
padding-right: 20px;
padding-left: 0px;
}

View File

@ -60,7 +60,3 @@ div#issue-changesets { float: left; margin-right: 1em; margin-left: 0 }
.journal-link { float: left; }
div.wiki pre { direction: ltr; }
#context-menu li.folder ul { left:auto; right:168px; }
#context-menu li.folder>ul { left:auto; right:148px; }
#context-menu li a.submenu { background:url("../images/bullet_arrow_left.png") left no-repeat; }