From cc7dbe717b47ca88d62585f12d13c3b678ff2a62 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 26 Mar 2012 20:46:48 +0000 Subject: [PATCH] fix autocomplete quick search box git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1305569 13f79535-47bb-0310-9956-ffa450edef68 --- .../api/DefaultRuntimeInfoService.java | 4 +- .../src/main/webapp/index.html | 84 +++++++++++++++---- .../src/main/webapp/js/archiva/main.js | 2 +- .../src/main/webapp/js/archiva/utils.js | 2 +- .../src/main/webapp/js/startup.js | 71 ---------------- 5 files changed, 75 insertions(+), 88 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/java/org/apache/archiva/webapp/ui/services/api/DefaultRuntimeInfoService.java b/archiva-modules/archiva-web/archiva-webapp-js/src/main/java/org/apache/archiva/webapp/ui/services/api/DefaultRuntimeInfoService.java index c7408e0c3..5846057c3 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/java/org/apache/archiva/webapp/ui/services/api/DefaultRuntimeInfoService.java +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/java/org/apache/archiva/webapp/ui/services/api/DefaultRuntimeInfoService.java @@ -20,6 +20,7 @@ package org.apache.archiva.webapp.ui.services.api; import org.apache.archiva.web.runtime.ArchivaRuntimeInfo; import org.apache.archiva.webapp.ui.services.model.ApplicationRuntimeInfo; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -60,7 +61,8 @@ public class DefaultRuntimeInfoService applicationRuntimeInfo.setVersion( this.archivaRuntimeInfo.getVersion() ); applicationRuntimeInfo.setBaseUrl( getBaseUrl( httpServletRequest ) ); - SimpleDateFormat sfd = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssz", new Locale( locale ) ); + SimpleDateFormat sfd = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssz", + new Locale( StringUtils.isEmpty( locale ) ? "en" : locale ) ); applicationRuntimeInfo.setTimestampStr( sfd.format( new Date( archivaRuntimeInfo.getTimestamp() ) ) ); return applicationRuntimeInfo; diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html index 506772acb..2bbe2b921 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html @@ -10,14 +10,7 @@ - + @@ -56,19 +49,82 @@