From: Olivier Lamy Date: Sun, 26 Feb 2012 23:06:30 +0000 (+0000) Subject: confirm modal on repository group delete X-Git-Tag: archiva-1.4-M3~1219 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c77fd573a8636ee1c48dc02f30f40398f8aaa5ea;p=archiva.git confirm modal on repository group delete git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293954 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties index f45b5ff21..b6443366c 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties @@ -177,6 +177,7 @@ repository.group.added=Repository Group {0} added. repository.groups.available.repositories=Available Repositories repository.groups.list=Repository Groups repository-groups.grid.tab.title=Repository Groups +repository.group.delete.confirm=Are you sure to delete Repository Group {0} ? #roles roles.bulk.save.confirm=Are you sure to update {0} Role(s) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js index 4ef600ff6..26c68b6d1 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repository-groups.js @@ -80,8 +80,14 @@ $(function() { this.findManagedRepository=function(id){ return findManagedRepository(id,self.managedRepositories()); } - this.deleteRepositoryGroup=function(repositoryGroup){ + openDialogConfirm( + function(){self.removeRepositoryGroup(repositoryGroup);window.modalConfirmDialog.modal('hide')}, + $.i18n.prop('ok'), $.i18n.prop('cancel'), + $.i18n.prop('repository.group.delete.confirm',repositoryGroup.id()), + $("#repository-group-location-warning-tmpl").tmpl(self.repositoryGroup)); + } + this.removeRepositoryGroup=function(repositoryGroup){ clearUserMessages(); $.ajax("restServices/archivaServices/repositoryGroupService/deleteRepositoryGroup/"+encodeURIComponent(repositoryGroup.id()), { diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/repository-groups.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/repository-groups.html index 922b0b712..eeb4cb5a7 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/repository-groups.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/repository-groups.html @@ -154,4 +154,10 @@ + + + \ No newline at end of file