roles screen add a column to save modified roles

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1243439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-02-13 08:57:55 +00:00
parent b27fba7bbc
commit bdbbc8984a
2 changed files with 17 additions and 0 deletions

View File

@ -179,6 +179,17 @@ $(function() {
}
}
updateRole=function(modifiedRole){
if (modifiedRole.modified()){
modifiedRole.updateDescription();
modifiedRole.modified(false);
}
if (modifiedRole.usersModified()){
modifiedRole.updateUsers();
modifiedRole.usersModified(false);
}
}
}
displayRolesGrid = function(){

View File

@ -190,6 +190,7 @@
<th>${ columnDefinition.headerText }</th>
{{/each}}
<th>${$.i18n.prop('edit')}</th>
<th>${$.i18n.prop('save')}</th>
</tr>
</thead>
<tbody>
@ -204,6 +205,11 @@
<td>
<a id="edit-role-${row.name()}" href="#" data-bind="click: function(){ editRole(row) }">${$.i18n.prop('edit')}</a>
</td>
<td>
{{if row.modified()}}
<a href="#" class="btn" data-bind="click: function(){ updateRole(row) }">${$.i18n.prop('save')}</a>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>