mirror of https://github.com/apache/archiva.git
deleting groupId tru the ui
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1381246 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
378c22258c
commit
948527a7bd
|
@ -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){
|
||||
|
|
|
@ -52,11 +52,20 @@
|
|||
{{if browseResultEntry.project}}
|
||||
<li class="browse-list-project" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">
|
||||
<a href="#">${displayEntry(browseResultEntry.name)}</a>
|
||||
{{else}}
|
||||
<li class="browse-list" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">
|
||||
<a href="#" title="folder ${displayEntry(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{else}}
|
||||
{{if deleteKarma}}
|
||||
<li class="browse-list">
|
||||
<img 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}}
|
||||
<li class="browse-list" >
|
||||
<a href="#" title="folder ${displayEntry(browseResultEntry.name)}" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">${displayEntry(browseResultEntry.name)}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue