1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

Always show "Jump to project" drop-down (#24833).

Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16199 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2017-01-15 12:09:24 +00:00
parent bef55bf1ab
commit df18ece504
2 changed files with 14 additions and 13 deletions

View File

@ -358,7 +358,6 @@ module ApplicationHelper
# Renders the project quick-jump box # Renders the project quick-jump box
def render_project_jump_box def render_project_jump_box
projects = projects_for_jump_box(User.current) projects = projects_for_jump_box(User.current)
if projects.any?
text = @project.try(:name) || l(:label_jump_to_a_project) text = @project.try(:name) || l(:label_jump_to_a_project)
trigger = content_tag('span', text, :class => 'drdn-trigger') trigger = content_tag('span', text, :class => 'drdn-trigger')
q = text_field_tag('q', '', :id => 'projects-quick-search', :class => 'autocomplete', :data => {:automcomplete_url => projects_path(:format => 'js')}) q = text_field_tag('q', '', :id => 'projects-quick-search', :class => 'autocomplete', :data => {:automcomplete_url => projects_path(:format => 'js')})
@ -372,7 +371,6 @@ module ApplicationHelper
content_tag('span', trigger + content, :id => "project-jump", :class => "drdn") content_tag('span', trigger + content, :id => "project-jump", :class => "drdn")
end end
end
def project_tree_options_for_select(projects, options = {}) def project_tree_options_for_select(projects, options = {})
s = ''.html_safe s = ''.html_safe

View File

@ -202,6 +202,9 @@ div + .drdn-items {border-top:1px solid #ccc;}
.drdn-items.selection>*.selected:before { .drdn-items.selection>*.selected:before {
content:"\2713 "; content:"\2713 ";
} }
.drdn-items.selection:empty {
border: none;
}
.drdn-items>span {color:#999;} .drdn-items>span {color:#999;}
#project-jump.drdn {width:200px;display:inline-block;} #project-jump.drdn {width:200px;display:inline-block;}