From 8b71bda229e13e1cfb7f6c0d4c1d002c37e97526 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Thu, 22 Nov 2012 16:16:19 +0100 Subject: [PATCH] SONAR-3325 Searching for files when package names are too longs --- .../WEB-INF/app/views/search/_autocomplete.html.erb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/search/_autocomplete.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/search/_autocomplete.html.erb index 3e2f99eee50..b3ab23700dc 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/search/_autocomplete.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/search/_autocomplete.html.erb @@ -11,7 +11,14 @@ %>
  • <%= message("qualifiers.#{resource.qualifier}") if first -%>
    - <%= qualifier_icon resource -%> <%= highlight(truncate(resource.name(true), :length => 70), params[:s]) -%> + <% + displayed_resource_name=resource.name(true) + name_length=displayed_resource_name.mb_chars.length + if name_length>70 + displayed_resource_name=truncate(displayed_resource_name.reverse, :length => 70).reverse + end + %> + <%= qualifier_icon resource -%> <%= highlight(displayed_resource_name, params[:s]) -%>
  • <% first=false end -- 2.39.5