artifact.delete.confirm.save=Are you sure to delete this artifact ?
groupId.delete.confirm.title=GroupId deletion
groupId.delete.confirm.save=Are you sure to delete groupId: {0} ?
+groupdId.deleted=groupId {0} deleted.
groupId.delete.missing.repoId= You must select a repository to delete a groupId.
browse.artifact.version=Version
browse.artifact.pom.snippet=POM Snippet
}
deleteGroupId=function(groupId){
+ var previousHash=getUrlHash();
+ $.log("previousHash:"+previousHash);
var repoId=getSelectedBrowsingRepository();
if(!repoId){
displayErrorMessage($.i18n.prop('groupId.delete.missing.repoId'));
type:"GET",
dataType:"json",
success:function(data){
-
-
+ window.sammyArchivaApplication.setLocation(previousHash);
+ displaySuccessMessage( $.i18n.prop("groupdId.deleted", groupId));
},
error:function(data){
displayRestError(data,"user-messages");
}, $.i18n.prop('ok'),
$.i18n.prop('cancel'),
$.i18n.prop('groupId.delete.confirm.title'),
- $.i18n.prop('groupId.delete.confirm.save'));
+ $.i18n.prop('groupId.delete.confirm.save',groupId));
}
}
$(textId).focus();
}
+ getUrlHash=function(){
+ var matches = window.location.toString().match(/^[^#]*(#.+)$/);
+ return matches ? matches[1] : null;
+ }
+
/**
* clear #main-content and call clearUserMessages
*/
{{/if}}
{{each(i,browseResultEntry) browseResultEntries}}
{{if browseResultEntry.project}}
- <li class="browse-list-project" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">
- <a href="#">${displayEntry(browseResultEntry.name)}</a>
- </li>
+ {{if deleteKarma}}
+ <li class="browse-list-project">
+ <img src="images/trash.png" data-bind="click:function(){deleteGroupId(browseResultEntry.name)}"/>
+ <a href="#" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
+ </li>
+ {{else}}
+ <li class="browse-list-project">
+ <a href="#" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
+ </li>
+ {{/if}}
{{else}}
{{if deleteKarma}}
<li class="browse-list">