From 26dd3e8b43f7dba9177adff796c29419479ef69a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 13 May 2017 09:26:43 +0000 Subject: [PATCH] Show no data message when searching only. git-svn-id: http://svn.redmine.org/redmine/trunk@16552 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/autocomplete.js.erb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 %>'); -- 2.39.5