From: Eric Davis Date: Sun, 22 Aug 2010 19:12:21 +0000 (+0000) Subject: Add RTL support to the context menu. #6012 X-Git-Tag: 1.1.0~428 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05527be943a5a333a29894fe89d94f3bafb816d5;p=redmine.git 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 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2c334b7f0..19dd654db 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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) }')" diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 83652b3e0..b3493cf7c 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -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 %> <%= javascript_tag "new ContextMenu('#{issues_context_menu_path}')" %> diff --git a/public/stylesheets/context_menu_rtl.css b/public/stylesheets/context_menu_rtl.css new file mode 100644 index 000000000..205bb9184 --- /dev/null +++ b/public/stylesheets/context_menu_rtl.css @@ -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; +} diff --git a/public/stylesheets/rtl.css b/public/stylesheets/rtl.css index 913667381..5dfe320bc 100644 --- a/public/stylesheets/rtl.css +++ b/public/stylesheets/rtl.css @@ -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; }