Skip to content

Commit

Permalink
added the jar icons to all tree nodes (except the first one)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydahanne committed Jun 13, 2013
1 parent bbc00b9 commit d0ee798
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Expand Up @@ -18,7 +18,7 @@ public class ArtifactUsageIndexHtmlCustomizer extends

@Override
public String getPostHeadContribution(Map<String, Object> ctx) {
String version = getVersionFromJarFile("/META-INF/maven/com.paypal.nexus/artifact-usage-plugin/pom.properties");
String version = getVersionFromJarFile("/META-INF/maven/org.ebayopensource.nexus.plugins/artifact-usage-plugin/pom.properties");

return "<script src=\"js/repoServer/nexus-artifact-usage-plugin-all.js"
+ (version == null ? "" : "?" + version)
Expand Down
Expand Up @@ -21,11 +21,14 @@ public class ArtifactUsageResourceBundle extends AbstractNexusResourceBundle {
public List<StaticResource> getContributedResouces() {
List<StaticResource> result = new ArrayList<StaticResource>();

DefaultStaticResource resource = new DefaultStaticResource(getClass()
.getResource("/static/js/nexus-artifact-usage-plugin-all.js"),
"/js/repoServer/nexus-artifact-usage-plugin-all.js",
"application/x-javascript");
result.add(resource);
result.add(new DefaultStaticResource(
getClass().getResource("/static/js/nexus-artifact-usage-plugin-all.js"),
"/js/repoServer/nexus-artifact-usage-plugin-all.js",
"application/x-javascript"));
result.add(new DefaultStaticResource(
getClass().getResource("/static/icons/jar-jar.png"),
"/icons/repoServer/jar-jar.png",
"image/png"));

return result;
}
Expand Down
Binary file added src/main/resources/static/icons/jar-jar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -434,6 +434,7 @@ Ext.extend(Ext.tree.SonatypeMultiLevelTreeLoader, Ext.tree.SonatypeTreeLoader,
for ( var i = 0, len = o.length; i < len; i++) {
var n = this.createNode(o[i]);
if (n) {
n.setIcon("icons/repoServer/jar-jar.png");
node.appendChild(n)
if (o[i].data) {
this.addNodes(n, o[i].data);
Expand Down

0 comments on commit d0ee798

Please sign in to comment.