fix tab title when switch from edit mode to add mode

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1220291 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-12-17 22:43:53 +00:00
parent 5c94157a44
commit efb82a7372
2 changed files with 7 additions and 1 deletions

View File

@ -95,7 +95,7 @@
<a href="#users-view">Users</a>
</li>
<li id="users-view-tabs-li-user-edit">
<a href="#createUserForm">Add User</a>
<a href="#createUserForm">{{$.i18n.prop('user.add')}}</a>
</li>
</ul>
<div id="users-view-tabs-content" class="tab-content">

View File

@ -124,6 +124,8 @@ $(function() {
activateUsersEditTab();
$("#users-view-tabs-li-user-edit a").html($.i18n.prop("user.edit"));
$("#main-content #user-create").delegate("#user-create-form-cancel-button", "click keydown", function(e) {
e.preventDefault();
activateUsersGridTab();
@ -166,6 +168,10 @@ $(function() {
if ($(e.target).attr("href")=="#createUserForm") {
window.redbackModel.usersViewModel.addUser();
}
if ($(e.target).attr("href")=="#users-view") {
$("#users-view-tabs-li-user-edit a").html($.i18n.prop("user.add"));
}
})
$("#users-view-tabs-content #users-view").addClass("active");
}