mirror of https://github.com/apache/archiva.git
ask confirmation before deleting remote repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1236448 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d3626d0e81
commit
ade168dbad
|
@ -608,19 +608,27 @@ $(function() {
|
|||
}
|
||||
|
||||
removeRemoteRepository=function(remoteRepository){
|
||||
$.ajax("restServices/archivaServices/remoteRepositoriesService/deleteRemoteRepository/"+remoteRepository.id(),
|
||||
{
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
self.remoteRepositories.remove(remoteRepository);
|
||||
displaySuccessMessage($.i18n.prop('remoterepository.deleted'));
|
||||
},
|
||||
error: function(data) {
|
||||
var res = $.parseJSON(data.responseText);
|
||||
displayRestError(res);
|
||||
}
|
||||
}
|
||||
);
|
||||
clearUserMessages();
|
||||
openDialogConfirm(
|
||||
function(){$.ajax("restServices/archivaServices/remoteRepositoriesService/deleteRemoteRepository/"+remoteRepository.id(),
|
||||
{
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
self.remoteRepositories.remove(remoteRepository);
|
||||
displaySuccessMessage($.i18n.prop('remoterepository.deleted'));
|
||||
},
|
||||
error: function(data) {
|
||||
var res = $.parseJSON(data.responseText);
|
||||
displayRestError(res);
|
||||
},
|
||||
complete:function(){
|
||||
closeDialogConfirm();
|
||||
}
|
||||
}
|
||||
)}, $.i18n.prop('ok'),
|
||||
$.i18n.prop('cancel'),
|
||||
$.i18n.prop('remoterepository.delete.confirm',remoteRepository.id()),null);
|
||||
|
||||
}
|
||||
|
||||
scheduleDownloadRemoteIndex=function(remoteRepository){
|
||||
|
|
Loading…
Reference in New Issue