aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-02-08 12:02:35 +0000
committerOlivier Lamy <olamy@apache.org>2014-02-08 12:02:35 +0000
commite35a0bef37bf394ea24a100ea5197a9ef68970b1 (patch)
treed9229b88e27c3aafc892c1ea1a0c788a05eeba46
parentb99013fe907c7d543906c5b9ebc1562aec4535c9 (diff)
downloadarchiva-e35a0bef37bf394ea24a100ea5197a9ef68970b1.tar.gz
archiva-e35a0bef37bf394ea24a100ea5197a9ef68970b1.zip
use local value for filtering of current descendant
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1565993 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
index be66adef3..cc271980c 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js
@@ -235,7 +235,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
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","jquery.ui","i18n","jquery.tmpl","select2","kn
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","jquery.ui","i18n","jquery.tmpl","select2","kn
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","jquery.ui","i18n","jquery.tmpl","select2","kn
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);