From: Olivier Lamy Date: Wed, 11 Jul 2012 13:24:34 +0000 (+0000) Subject: prevent some js npe X-Git-Tag: archiva-1.4-M3~513 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e30d7757609736f2b8fc306a715a7de59cb94b96;p=archiva.git prevent some js npe git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1360167 13f79535-47bb-0310-9956-ffa450edef68 --- 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 @@ ${$.i18n.prop('browse.artifact.artifactId')} ${artifactId} + {{if projectVersionMetadata}} ${$.i18n.prop('browse.artifact.name')} ${projectVersionMetadata.name} + {{/if}} + {{if projectVersionMetadata}} ${$.i18n.prop('browse.artifact.description')} ${projectVersionMetadata.description} - {{if projectVersionMetadata.mavenFacet}} + {{/if}} + {{if projectVersionMetadata && projectVersionMetadata.mavenFacet}} ${$.i18n.prop('browse.artifact.packaging')} ${projectVersionMetadata.mavenFacet.packaging} {{/if}} - {{if projectVersionMetadata.organization}} + {{if projectVersionMetadata && projectVersionMetadata.organization}} ${$.i18n.prop('browse.artifact.organization.name')} {{if projectVersionMetadata.organization.url}} @@ -139,7 +143,7 @@ {{/if}} {{/if}} - {{if projectVersionMetadata.issueManagement}} + {{if projectVersionMetadata && projectVersionMetadata.issueManagement}} ${$.i18n.prop('browse.artifact.organization.issueManagement')} @@ -448,6 +452,7 @@
+ {{if projectVersionMetadata}}
${projectVersionMetadata.description}
@@ -593,6 +598,7 @@
{{/if}}
+ {{/if}}