]> source.dussan.org Git - archiva.git/commitdiff
fix snippet url
authorOlivier Lamy <olamy@apache.org>
Fri, 20 Jan 2012 13:23:33 +0000 (13:23 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 20 Jan 2012 13:23:33 +0000 (13:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233900 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultManagedRepositoriesService.java
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/repositories.html

index 3d18e730e08c12971c25efb351605a95897af95c..490a6f570f3d5ee3275a787f740d067c4453d287 100644 (file)
@@ -216,6 +216,7 @@ public class DefaultManagedRepositoriesService
 
         snippet.append( "    <" ).append( distRepoName ).append( ">\n" );
         snippet.append( "      <id>" ).append( repo.getId() ).append( "</id>\n" );
+        snippet.append( "      <url>" );
         snippet.append( getBaseUrl( httpServletRequest ) + "repository" );
         snippet.append( "/" ).append( repo.getId() ).append( "/" ).append( "</url>\n" );
 
index a24c9ba684f2e156fc497aeea690a662b36ebde9..5db7906fd7da044368e537f4917791d2bbb9aab5 100644 (file)
@@ -366,16 +366,14 @@ $(function() {
 
     showPomSnippet=function(managedRepository){
 
-
+      $("#managed-repositories-pom-snippet").html(mediumSpinnerImg());
+      $('#managed-repositories-pom-snippet').show();
       var url = "restServices/archivaServices/managedRepositoriesService/getPomSnippet/"+managedRepository.id();
       $.ajax(url,
         {
           type: "GET",
           dataType: 'text',
           success: function(data) {
-            //var snippet='<div class="page-header">';
-            //snippet +="<h2>POM Snippet</h2></div>";
-            //$("#managed-repositories-pom-snippet").html(snippet+"<pre>"+data+"</pre>");
             $("#managed-repositories-pom-snippet").html($("#pom-snippet-tmpl").tmpl(data));
           },
           error: function(data) {
@@ -383,7 +381,7 @@ $(function() {
             displayRestError(res);
           },
           complete: function(){
-           }
+          }
         }
       );
 
index 80502b6b3a6784cf9173376082e5f38779433ce5..66d3fa8856fdd0d0e25db1b96dbdf6850148eea1 100644 (file)
   </div>
 </script>
 <script id="pom-snippet-tmpl" type='text/x-jquery-tmpl'>
-    <div class="page-header">
+  <div class="page-header">
     <h2>POM Snippet</h2></div>
-    <pre>${$data}</pre>
+  </div>
+  <div><a href="#" onclick="$('#managed-repositories-pom-snippet').effect('blind')">${$.i18n.prop('hide')}</a></div>
+  <pre>${$data}</pre>
 </script>
\ No newline at end of file