metadatasUrl+="/"+encodeURIComponent(version);
metadatasUrl+="/"+encodeURIComponent(entry.key());
var selectedRepo=getSelectedBrowsingRepository();
- if (selectedRepo){
- metadatasUrl+="?repositoryId="+encodeURIComponent(selectedRepo);
+
+ if(!selectedRepo){
+ clearUserMessages();
+ displayErrorMessage($.i18n.prop('repository.selected.missing'));
+ return;
}
+
+ metadatasUrl+="?repositoryId="+encodeURIComponent(selectedRepo);
+
$.ajax(metadatasUrl, {
type: "DELETE",
dataType: 'json',
displayErrorMessage( $.i18n.prop("artifact.metadata.value.mandatory"));
return;
}
+
+ var selectedRepo=getSelectedBrowsingRepository();
+
+ if(!selectedRepo){
+ clearUserMessages();
+ displayErrorMessage($.i18n.prop('repository.selected.missing'));
+ return;
+ }
+
var metadatasUrl="restServices/archivaServices/browseService/metadata/"+encodeURIComponent(groupId);
metadatasUrl+="/"+encodeURIComponent(artifactId);
metadatasUrl+="/"+encodeURIComponent(version);
metadatasUrl+="/"+encodeURIComponent(entry.key());
metadatasUrl+="/"+encodeURIComponent(entry.value());
- var selectedRepo=getSelectedBrowsingRepository();
+
if (selectedRepo){
metadatasUrl+="?repositoryId="+encodeURIComponent(selectedRepo);
}