aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-01-15 04:03:57 +0000
committerOlivier Lamy <olamy@apache.org>2014-01-15 04:03:57 +0000
commit40aa29cfb56163c4f8fb14e946cab04cd9c35f2f (patch)
tree5cb714adc3b9b6d38b3f8cac6674de70cfcf41be
parent92887a8def501b2e9efb5673477057cb3800183c (diff)
downloadarchiva-40aa29cfb56163c4f8fb14e946cab04cd9c35f2f.tar.gz
archiva-40aa29cfb56163c4f8fb14e946cab04cd9c35f2f.zip
fix filtering
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1558291 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js10
1 files changed, 6 insertions, 4 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 b529814d7..756434a8d 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
@@ -1423,7 +1423,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
}
enableAutocompleBrowse=function(groupId){
- $.log("enableAutocompleBrowse");
+ $.log("enableAutocompleBrowse with groupId:'"+groupId+"'");
$("#select_browse_repository" ).select2({width: "resolve"});
// browse-autocomplete
var url="restServices/archivaServices/browseService/rootGroups";
@@ -1441,9 +1441,9 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
{
name: 'browse-result',
remote: {
- url: groupId?url+'/%QUERY':url,
+ url: url,//groupId?url+'/%QUERY':url,
beforeSend: function(jqXhr){
- $.log("beforeSend");
+ $.log("beforeSend browseBox.val():'"+browseBox.val()+"'");
},
filter: function(parsedResponse){
var request = browseBox.val();
@@ -1492,10 +1492,12 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn
result=browseResultEntries;
}
var filtered = [];
+ $.log("filtering with request '"+request+"'");
for(var i=0;i<browseResultEntries.length;i++){
if (groupId){
if (browseResultEntries[i].name.startsWith(groupId+'.'+request)){
- filtered.push(browseResultEntries[i]);
+ var item = browseResultEntries[i];
+ filtered.push(item.name.substring(groupId.length+1, item.name.length));
}
} else {
if (browseResultEntries[i].name.startsWith(request)){