[MRM-1573] start work on browse screen

navigate on groupIds.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245185 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-02-16 21:27:08 +00:00
parent f86f621808
commit 56c137f27f
2 changed files with 12 additions and 5 deletions

View File

@ -38,7 +38,7 @@ public class BrowseGroupIdResult
public BrowseGroupIdResult( List<BrowseGroupIdEntry> browseGroupIdEntries )
{
// no op
this.browseGroupIdEntries = browseGroupIdEntries;
}
public List<BrowseGroupIdEntry> getBrowseGroupIdEntries()

View File

@ -27,10 +27,12 @@ $(function() {
type: "GET",
dataType: 'json',
success: function(data) {
var groupdIds = $.map(data.groupIdList.groupIds,function(item){
return item;
});
$.log("size:"+groupdIds.length);
var browseGroupIdEntryies = $.isArray(data.browseGroupIdResult.browseGroupIdEntries) ?
$.map(data.browseGroupIdResult.browseGroupIdEntries,function(item){
$.log("name:"+item.name);
return new BrowseGroupIdEntry(item.name, item.project);
}): [data.browseGroupIdResult.browseGroupIdEntries];
$.log("size:"+browseGroupIdEntryies.length);
//var browseTopViewModel = new BrowseTopViewModel(groupdIds);
//ko.applyBindings(browseTopViewModel,mainContent.find("#browse_result" ).get(0));
@ -61,4 +63,9 @@ $(function() {
displaySearch=function(){
$("#main-content" ).html("coming soon :-)");
}
BrowseGroupIdEntry=function(name,project){
this.name=name;
this.project=project;
}
});