mirror of https://github.com/apache/archiva.git
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:
parent
21cf00c48a
commit
1f838d43bc
|
@ -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)
|
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
|
proxyconnector.delete.confirm=Are you sure to delete the Proxy Connector
|
||||||
|
|
||||||
|
|
||||||
|
#roles
|
||||||
|
role.bulk.save.confirm=Are you sure to update {0} Role(s)
|
||||||
|
|
||||||
|
|
|
@ -164,19 +164,32 @@ $(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateModifiedRoles=function(){
|
updateModifiedRoles=function(){
|
||||||
|
|
||||||
|
|
||||||
var modifiedRoles = getModifiedRoles();
|
var modifiedRoles = getModifiedRoles();
|
||||||
$.log("modifiedRoles:"+modifiedRoles);
|
$.log("modifiedRoles:"+modifiedRoles);
|
||||||
for(i=0;i<modifiedRoles.length;i++){
|
|
||||||
var modifiedRole=modifiedRoles[i];
|
|
||||||
if (modifiedRole.modified()){
|
openDialogConfirm(function(){
|
||||||
modifiedRole.updateDescription();
|
for(i=0;i<modifiedRoles.length;i++){
|
||||||
modifiedRole.modified(false);
|
var modifiedRole=modifiedRoles[i];
|
||||||
}
|
if (modifiedRole.modified()){
|
||||||
if (modifiedRole.usersModified()){
|
modifiedRole.updateDescription();
|
||||||
modifiedRole.updateUsers();
|
modifiedRole.modified(false);
|
||||||
modifiedRole.usersModified(false);
|
}
|
||||||
}
|
if (modifiedRole.usersModified()){
|
||||||
}
|
modifiedRole.updateUsers();
|
||||||
|
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){
|
updateRole=function(modifiedRole){
|
||||||
|
|
Loading…
Reference in New Issue