hack jqueryui to have autocomplete working with bootstrap

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293869 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-02-26 16:58:13 +00:00
parent 9ffa0353f1
commit bd98d2d274
7 changed files with 11624 additions and 629 deletions

View File

@ -61,7 +61,6 @@ public class DefaultSearchService
implements SearchService implements SearchService
{ {
@Inject @Inject
private RepositorySearch repositorySearch; private RepositorySearch repositorySearch;

View File

@ -85,4 +85,15 @@
.force-upper-case{ .force-upper-case{
text-transform: uppercase; text-transform: uppercase;
}
.dropdown-menu {
max-width: 920px;
}
.ui-menu-item {
cursor: pointer;
}
.ui-autocomplete-loading{
background:url('../images/small-spinner.gif') no-repeat right center;
} }

View File

@ -187,16 +187,18 @@ $(function() {
}) })
$( "#quick-search-autocomplete" ).autocomplete({ $( "#quick-search-autocomplete" ).autocomplete({
minLength: 3,
source: function(request, response){
$.get("restServices/archivaServices/searchService/quickSearch?queryString="+encodeURIComponent(request.term),
function(data) {
var res = $.map(data.artifact,function(item){
return item.artifactId;
});
response(res);
}
);
minLength: 3, }
source: function( request, response ) {
$.log("source");
return ["foo","bar"];
/*var data = $.getJSON( "restServices/archivaServices/searchService/quickSearch?queryString="+encodeURIComponent(request.term));
return $.map(data,function(item){
return item.artifactId;
})*/
}
}); });

View File

@ -48,9 +48,9 @@
</a> </a>
</li> </li>
<li class="pull-right"> <li class="pull-right">
<form class="form-search pull-right" action=""> <div class="ui-widget">
<input type="text" class="ui-widget" id="quick-search-autocomplete" placeholder="Search" /> <input type="text" class="ui-autocomplete-input" id="quick-search-autocomplete" placeholder="Search" />
</form> </div>
</li> </li>
</ul> </ul>