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
This commit is contained in:
Olivier Lamy 2012-08-23 21:20:46 +00:00
parent 6506537883
commit 0a391942e8
2 changed files with 7 additions and 2 deletions

View File

@ -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();
})
}
})

View File

@ -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,