From 0a391942e8273af21449c6ea6cf3ce1916925f03 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 23 Aug 2012 21:20:46 +0000 Subject: [PATCH] separate loading of automcomplete to prevent full failure in case of issue git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1376703 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-webapp-js/src/main/webapp/js/archiva/archiva.js | 3 ++- .../archiva-webapp-js/src/main/webapp/js/archiva/main.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js index 8a63149d4..8b0fb49d7 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js @@ -97,7 +97,7 @@ $.ajax({ } }); - requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!'], function (domReady) { + requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils',"archiva.main",'domReady!'], function (domReady) { loadi18n(function () { $.ajax({ url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(), @@ -110,6 +110,7 @@ $.ajax({ require(['sammy','jquery','jquery.tmpl','archiva.main','utils','domReady!'],function (domReady) { startArchivaApplication(); $("#loadingDiv").hide(); + drawQuickSearchAutocomplete(); }) } }) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js index 6127c28b8..ed10423fb 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js @@ -20,7 +20,7 @@ define("archiva.main",["jquery","jquery.ui","sammy","jquery.tmpl","jquery.cookie "jquery.validate","jquery.json","knockout","redback.templates","archiva.templates", "redback.roles","redback","archiva.general-admin","archiva.repositories", "archiva.network-proxies","archiva.proxy-connectors","archiva.repository-groups","archiva.artifacts-management"], -function($,sammy,tmpl,ui) { +function(jquery,ui,sammy,tmpl) { /** * reccord a cookie for session with the logged user @@ -601,6 +601,10 @@ function($,sammy,tmpl,ui) { window.sammyArchivaApplication.run(); + } + + drawQuickSearchAutocomplete=function(){ + $( "#quick-search-autocomplete" ).autocomplete({ minLength: 3, delay: 600, -- 2.39.5