]> source.dussan.org Git - archiva.git/commitdiff
separate loading of automcomplete to prevent full failure in case of issue
authorOlivier Lamy <olamy@apache.org>
Thu, 23 Aug 2012 21:20:46 +0000 (21:20 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 23 Aug 2012 21:20:46 +0000 (21:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1376703 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js

index 8a63149d4c151dab5e61430e20dfdd8df6164a50..8b0fb49d7a8bfdfd41dc22935215ac4ff7c8efc7 100644 (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();
                           })
                       }
                     })
index 6127c28b87463d9a884dddcc2a82afbfb7cdc9a6..ed10423fb9928d4005cdea39ceed589075778a72 100644 (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,