From: Jean-Philippe Lang Date: Sat, 13 May 2017 09:26:43 +0000 (+0000) Subject: Show no data message when searching only. X-Git-Tag: 3.4.0~126 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=26dd3e8b43f7dba9177adff796c29419479ef69a;p=redmine.git Show no data message when searching only. git-svn-id: http://svn.redmine.org/redmine/trunk@16552 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/projects/autocomplete.js.erb b/app/views/projects/autocomplete.js.erb index de6c3f579..03f7fa640 100644 --- a/app/views/projects/autocomplete.js.erb +++ b/app/views/projects/autocomplete.js.erb @@ -1,2 +1,9 @@ -<% s = @projects.any? ? render_projects_for_jump_box(@projects) : content_tag('span', l(:label_no_data)) %> +<% + s = '' + if @projects.any? + s = render_projects_for_jump_box(@projects) + elsif params[:q].present? + s = content_tag('span', l(:label_no_data)) + end +%> $('#project-jump .drdn-items.projects').html('<%= escape_javascript s %>');