]> source.dussan.org Git - archiva.git/commitdiff
prevent some js npe
authorOlivier Lamy <olamy@apache.org>
Wed, 11 Jul 2012 13:24:34 +0000 (13:24 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 11 Jul 2012 13:24:34 +0000 (13:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1360167 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html

index 54d4ad6a4cb9239f28335b7f2e94e878a0a57a2b..e5e2879dcfc6d983a6e78783d84f554111963fe7 100644 (file)
@@ -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);
   }
index b58a88216007d93ae01f2157c0bd3519e32f2df2..118177a50791a5fe055f1e3243b0a237af990304 100644 (file)
               <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}}
               {{/if}}
             </tr>
             {{/if}}
-            {{if projectVersionMetadata.issueManagement}}
+            {{if projectVersionMetadata && projectVersionMetadata.issueManagement}}
             <tr>
               <th>${$.i18n.prop('browse.artifact.organization.issueManagement')}</th>
               <td>
       </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">
         </div>
         {{/if}}
          </div>
+      {{/if}}
 
 
          <div id="artifact-details-dependencies-content" class="tab-pane">