From: Fabrice Bellingard Date: Thu, 22 Nov 2012 15:16:19 +0000 (+0100) Subject: SONAR-3325 Searching for files when package names are too longs X-Git-Tag: 3.4~295 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8b71bda229e13e1cfb7f6c0d4c1d002c37e97526;p=sonarqube.git SONAR-3325 Searching for files when package names are too longs --- 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