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);
}
});
}
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);
}
});
return "";
}
- enableAutocompleBrowse=function(groupId){
+ enableAutocompleBrowse=function(groupId,entries){
$.log("enableAutocompleBrowse with groupId:'"+groupId+"'");
$("#select_browse_repository").select2({width: "resolve"});
// browse-autocomplete
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);