});
});
}
+
+ displayGroup=function(groupId){
+ var parentBrowseViewModel=new BrowseViewModel(null,null,null);
+ displayGroupDetail(groupId,parentBrowseViewModel,null);
+ }
+
+ displayArtifactDetailView=function(groupId, artifactId){
+ displayArtifactDetail(groupId, artifactId);
+ }
+
+ displayArtifactVersionDetailViewModel=function(groupId,artifactId,version){
+ var artifactVersionDetailViewModel = new ArtifactVersionDetailViewModel (groupId,artifactId,version)
+ artifactVersionDetailViewModel.display();
+ }
}
displayArtifactDetail=function(groupId,artifactId,parentBrowseViewModel,restUrl){
this.displayValue=displayValue;
this.artifactId=null;
this.artifact=false;
+ this.version=null;
}
mapVersionsList=function(data){
if (data){
var curGroupId="";
for (var i=0;i<splitted.length;i++){
curGroupId+=splitted[i];
+ $.log("splitted[i]:"+i+":"+splitted[i]);
breadCrumbEntries.push(new BreadCrumbEntry(curGroupId,splitted[i]));
curGroupId+="."
}
- breadCrumbEntries.push(new BreadCrumbEntry(self.artifactId,self.artifactId));
+ var crumbEntryArtifact=new BreadCrumbEntry(self.groupId,self.artifactId);
+ crumbEntryArtifact.artifactId=self.artifactId;
+ crumbEntryArtifact.artifact=true;
+ breadCrumbEntries.push(crumbEntryArtifact);
+
+ var crumbEntryVersion=new BreadCrumbEntry(self.groupId,self.version);
+ crumbEntryVersion.artifactId=self.artifactId;
+ crumbEntryVersion.artifact=false;
+ crumbEntryVersion.version=self.version;
+ breadCrumbEntries.push(crumbEntryVersion);
+
return breadCrumbEntries;
}
<td>
{{var entries=dependency.crumbEntries()}}
{{each(j,crumbEntry) entries}}
- ${crumbEntry.displayValue}
- {{if j < entries.length - 1}}
+ {{if j < entries.length - 2}}
+ <a href="#" data-bind="click: function(){displayGroup(crumbEntry.groupId)}">${crumbEntry.displayValue}</a>
+ {{else j == entries.length - 2}}
+ <a href="#" data-bind="click: function(){displayArtifactDetailView(crumbEntry.groupId,crumbEntry.artifactId)}">${crumbEntry.displayValue}</a>
+ {{else j == entries.length - 1}}
+ | <b>${$.i18n.prop('browse.artifact.version')}:</b>
+ <a href="#" data-bind="click: function(){displayArtifactVersionDetailViewModel(crumbEntry.groupId,crumbEntry.artifactId,crumbEntry.version)}">${dependency.version}</a>
+ {{/if}}
+ {{if j < entries.length - 2}}
/
{{/if}}
{{/each}}
- | <b>${$.i18n.prop('browse.artifact.version')}:</b> ${dependency.version}
+
{{if dependency.scope}}
| <b>${$.i18n.prop('browse.artifact.scope')}:</b> ${dependency.scope}
{{/if}}