}
deleteGroupId=function(groupId){
- var previousHash=getUrlHash();
- $.log("previousHash:"+previousHash);
+
var repoId=getSelectedBrowsingRepository();
if(!repoId){
- displayErrorMessage($.i18n.prop('groupId.delete.missing.repoId'));
+ var escapedGroupId=escapeDot(groupId );
+ var selected = $("#main-content" ).find("#delete-"+escapedGroupId );
+ selected.attr("data-content",$.i18n.prop('groupId.delete.missing.repoId'))
+ selected.popover({
+ html:true,
+ template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
+ placement:'top',
+ trigger:'manual'});
+ selected.popover('show');
+ selected.mouseover(function(){
+ selected.popover("destroy");
+ });
return;
}
+ var previousHash=getUrlHash();
+ $.log("previousHash:"+previousHash);
openDialogConfirm(function(){
$.ajax({
url:"restServices/archivaServices/repositoriesService/deleteGroupId?groupId="+groupId+"&repositoryId="+repoId,
location+="~"+self.repositoryId;
}
location+="/"+groupId;
- window.sammyArchivaApplication.setLocation(location); }
+ window.sammyArchivaApplication.setLocation(location);
+ }
displayParent=function(){
var selectedRepo=getSelectedBrowsingRepository();
return this.substring(idx);
}
+ escapeDot=function(str){
+ return str.replace(/\./g,"\\\.");
+ }
+
//-----------------------------------------
// extends jquery tmpl to support var def
//-----------------------------------------
{{if browseResultEntry.project}}
{{if deleteKarma}}
<li class="browse-list-project">
- <img src="images/trash.png" data-bind="click:function(){deleteGroupId(browseResultEntry.name)}"/>
+ <img id="delete-${browseResultEntry.name}" 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}}
{{else}}
{{if deleteKarma}}
<li class="browse-list">
- <img src="images/trash.png" data-bind="click:function(){deleteGroupId(browseResultEntry.name)}"/>
+ <img id="delete-${browseResultEntry.name}" src="images/trash.png" data-bind="click:function(){deleteGroupId(browseResultEntry.name)}"/>
<a data-bind="click:function(){displayGroupId(browseResultEntry.name)}" href="#" title="folder ${displayEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
</li>
{{else}}