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 367e7cac6..ae02c3a6f 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 @@ -80,6 +80,38 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno } return value; } + + deleteKarma=function(){ + return hasKarma('archiva-delete-artifact'); + } + + deleteGroupId=function(groupId){ + var repoId=getSelectedBrowsingRepository(); + if(!repoId){ + displayErrorMessage($.i18n.prop('groupId.delete.missing.repoId')); + return; + } + openDialogConfirm(function(){ + $.ajax({ + url:"restServices/archivaServices/repositoriesService/deleteGroupId?groupId="+groupId+"&repositoryId="+repoId, + type:"GET", + dataType:"json", + success:function(data){ + + + }, + error:function(data){ + displayRestError(data,"user-messages"); + }, + complete:function(){ + closeDialogConfirm(); + } + }); + }, $.i18n.prop('ok'), + $.i18n.prop('cancel'), + $.i18n.prop('groupId.delete.confirm.title'), + $.i18n.prop('groupId.delete.confirm.save')); + } } calculateBreadCrumbEntries=function(groupId){ 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 b5907b124..271aefdad 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 @@ -52,11 +52,20 @@ {{if browseResultEntry.project}}