summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-07-11 13:24:34 +0000
committerOlivier Lamy <olamy@apache.org>2012-07-11 13:24:34 +0000
commite30d7757609736f2b8fc306a715a7de59cb94b96 (patch)
treedb20dc8099ba85696c2cdf849023ea9f69203518 /archiva-modules/archiva-web
parent57014d6ab0e5884d542ec0df42ef5f8b12c2f8bc (diff)
downloadarchiva-e30d7757609736f2b8fc306a715a7de59cb94b96.tar.gz
archiva-e30d7757609736f2b8fc306a715a7de59cb94b96.zip
prevent some js npe
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1360167 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js1
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html12
2 files changed, 10 insertions, 3 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
index 54d4ad6a4..e5e2879dc 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
@@ -830,6 +830,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
}
displayBrowseArtifactDetail=function(groupId, artifactId){
+ $.log("displayBrowseArtifactDetail");
window.sammyArchivaApplication.setLocation("#artifact/"+groupId+"/"+artifactId);
//displayArtifactDetail(groupId,artifactId,null,null);
}
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html
index b58a88216..118177a50 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html
@@ -111,21 +111,25 @@
<th>${$.i18n.prop('browse.artifact.artifactId')}</th>
<td>${artifactId}</td>
</tr>
+ {{if projectVersionMetadata}}
<tr>
<th>${$.i18n.prop('browse.artifact.name')}</th>
<td>${projectVersionMetadata.name}</td>
</tr>
+ {{/if}}
+ {{if projectVersionMetadata}}
<tr>
<th>${$.i18n.prop('browse.artifact.description')}</th>
<td>${projectVersionMetadata.description}</td>
</tr>
- {{if projectVersionMetadata.mavenFacet}}
+ {{/if}}
+ {{if projectVersionMetadata && projectVersionMetadata.mavenFacet}}
<tr>
<th>${$.i18n.prop('browse.artifact.packaging')}</th>
<td>${projectVersionMetadata.mavenFacet.packaging}</td>
</tr>
{{/if}}
- {{if projectVersionMetadata.organization}}
+ {{if projectVersionMetadata && projectVersionMetadata.organization}}
<tr>
<th>${$.i18n.prop('browse.artifact.organization.name')}</th>
{{if projectVersionMetadata.organization.url}}
@@ -139,7 +143,7 @@
{{/if}}
</tr>
{{/if}}
- {{if projectVersionMetadata.issueManagement}}
+ {{if projectVersionMetadata && projectVersionMetadata.issueManagement}}
<tr>
<th>${$.i18n.prop('browse.artifact.organization.issueManagement')}</th>
<td>
@@ -448,6 +452,7 @@
</li>
</ul>
<div class="tab-content">
+ {{if projectVersionMetadata}}
<div id="artifact-details-info-content" class="tab-pane active">
<blockquote>${projectVersionMetadata.description}</blockquote>
<div class="row-fluid">
@@ -593,6 +598,7 @@
</div>
{{/if}}
</div>
+ {{/if}}
<div id="artifact-details-dependencies-content" class="tab-pane">