role screen bulk add confirm dialog before saving all

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1243444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-02-13 08:59:51 +00:00
parent 21cf00c48a
commit 1f838d43bc
2 changed files with 28 additions and 11 deletions

View File

@ -148,3 +148,7 @@ proxy-connectors.remoterepo.settings.networkproxy=Network Proxy
proxy.connector.bulk.save.confirm=Are you sure to update {0} Proxy Connector(s)
proxyconnector.delete.confirm=Are you sure to delete the Proxy Connector
#roles
role.bulk.save.confirm=Are you sure to update {0} Role(s)

View File

@ -164,8 +164,13 @@ $(function() {
}
updateModifiedRoles=function(){
var modifiedRoles = getModifiedRoles();
$.log("modifiedRoles:"+modifiedRoles);
openDialogConfirm(function(){
for(i=0;i<modifiedRoles.length;i++){
var modifiedRole=modifiedRoles[i];
if (modifiedRole.modified()){
@ -177,6 +182,14 @@ $(function() {
modifiedRole.usersModified(false);
}
}
closeDialogConfirm();
},
$.i18n.prop('ok'),
$.i18n.prop('cancel'),
$.i18n.prop('bulk.save.confirm.title'),
$.i18n.prop('role.bulk.save.confirm',modifiedRoles.length));
}
updateRole=function(modifiedRole){