refactor: 用户名保存时更新所有用户显示名称
#Comment commit commit:34b4c45792916379226c1c3b71bb5ff96740e577
This commit is contained in:
parent
6f34d76a9f
commit
e2909f3d30
|
@ -90,7 +90,7 @@
|
||||||
url: Profiles.url, method: "put", data: data, title: "修改用户显示名称",
|
url: Profiles.url, method: "put", data: data, title: "修改用户显示名称",
|
||||||
callback: function (result) {
|
callback: function (result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
$('#userDisplayName, .nav-header .username').text(data.DisplayName);
|
$('.username').text(data.DisplayName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -75,7 +75,7 @@ $(function () {
|
||||||
},
|
},
|
||||||
callback: function (data) {
|
callback: function (data) {
|
||||||
if (data && data.success && data.oper === 'save' && data.data.UserName === $('#userDisplayName').attr('data-userName')) {
|
if (data && data.success && data.oper === 'save' && data.data.UserName === $('#userDisplayName').attr('data-userName')) {
|
||||||
$('#userDisplayName, .nav-header .username').text(data.data.DisplayName);
|
$('.username').text(data.data.DisplayName);
|
||||||
}
|
}
|
||||||
if (data && data.oper === 'create') {
|
if (data && data.oper === 'create') {
|
||||||
$('#userName').prop('readonly', false).removeClass("ignore");
|
$('#userName').prop('readonly', false).removeClass("ignore");
|
||||||
|
|
Loading…
Reference in New Issue