archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1563018 - /archiva/branches/2.0.0-RC/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
Date Thu, 30 Jan 2014 23:42:38 GMT
Author: olamy
Date: Thu Jan 30 23:42:38 2014
New Revision: 1563018

URL: http://svn.apache.org/r1563018
Log:
use local value for filtering of current descendant

Modified:
    archiva/branches/2.0.0-RC/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js

Modified: archiva/branches/2.0.0-RC/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
URL: http://svn.apache.org/viewvc/archiva/branches/2.0.0-RC/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js?rev=1563018&r1=1563017&r2=1563018&view=diff
==============================================================================
--- archiva/branches/2.0.0-RC/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
(original)
+++ archiva/branches/2.0.0-RC/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
Thu Jan 30 23:42:38 2014
@@ -235,7 +235,7 @@ define("archiva.search",["jquery","jquer
               var browseViewModel = new BrowseViewModel(browseResultEntries,parentBrowseViewModel,groupId,repositoryId,feedsUrl);
               ko.applyBindings(browseViewModel,browseBreadCrumb.get(0));
               ko.applyBindings(browseViewModel,browseResult.get(0));
-              enableAutocompleBrowse(groupId);
+              enableAutocompleBrowse(groupId,browseResultEntries);
             }
          });
         }
@@ -1381,7 +1381,7 @@ define("archiva.search",["jquery","jquer
                     var browseViewModel = new BrowseViewModel(browseResultEntries,null,null,repositoryId);
                     ko.applyBindings(browseViewModel,mainContent.find("#browse_breadcrumb").get(0));
                     ko.applyBindings(browseViewModel,mainContent.find("#browse_result").get(0));
-                    enableAutocompleBrowse();
+                    enableAutocompleBrowse(null,browseResultEntries);
                   }
               });
 
@@ -1423,7 +1423,7 @@ define("archiva.search",["jquery","jquer
     return "";
   }
 
-  enableAutocompleBrowse=function(groupId){
+  enableAutocompleBrowse=function(groupId,entries){
     $.log("enableAutocompleBrowse with groupId:'"+groupId+"'");
     $("#select_browse_repository").select2({width: "resolve"});
     // browse-autocomplete
@@ -1441,13 +1441,10 @@ define("archiva.search",["jquery","jquer
     browseBox.typeahead(
         {
           name: 'browse-result-'+$.now() ,////hack to avoid local storage caching
-          local: [],
+          local: entries? entries : [],
           remote: {
             url: url,
             cache: false,
-            beforeSend: function(jqXhr){
-              $.log("beforeSend browseBox.val():'"+browseBox.val()+"'");
-            },
             filter: function(parsedResponse){
               var request = browseBox.val();
               $.log("filter:"+request);



Mime
View raw message