summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-02-27 00:55:47 +0000
committerOlivier Lamy <olamy@apache.org>2012-02-27 00:55:47 +0000
commitb2d5f97603c49a482de5a6b83f642ccf80c02344 (patch)
tree6e7e727eb5523fddc68b903bf8a0525d6b7b8bcd /archiva-modules
parent5dd0f106686404f5c749237a20aaee547c998942 (diff)
downloadarchiva-b2d5f97603c49a482de5a6b83f642ccf80c02344.tar.gz
archiva-b2d5f97603c49a482de5a6b83f642ccf80c02344.zip
avoid duplicate entries in the autocomplete search bix
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293979 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
index 97ea676d8..5ebea9d3a 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
@@ -194,7 +194,13 @@ $(function() {
var res = $.map(data.artifact,function(item){
return item.artifactId;
});
- response(res);
+ var uniqId = [];
+ for (var i= 0;i<res.length;i++){
+ if ( $.inArray(res[i],uniqId)<0){
+ uniqId.push(res[i]);
+ }
+ }
+ response(uniqId);
}
);