diff options
author | Olivier Lamy <olamy@apache.org> | 2012-02-27 00:55:47 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-02-27 00:55:47 +0000 |
commit | b2d5f97603c49a482de5a6b83f642ccf80c02344 (patch) | |
tree | 6e7e727eb5523fddc68b903bf8a0525d6b7b8bcd /archiva-modules | |
parent | 5dd0f106686404f5c749237a20aaee547c998942 (diff) | |
download | archiva-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.js | 8 |
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); } ); |