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) {
displayRestError(res);
},
complete: function(){
- }
+ }
}
);
</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