修改BUG:用户维护页面登录用户名可编辑

This commit is contained in:
Argo-Lenovo 2016-12-22 19:16:28 +08:00
parent 7ac460befe
commit 0abe977f45
2 changed files with 9 additions and 1 deletions

View File

@ -81,13 +81,15 @@
var op = {
dataEntity: $.extend({}, this.options.dataEntity),
table: this.options.bootstrapTable,
modal: this.options.modal
modal: this.options.modal,
src: this
};
return {
'click .edit': function (e, value, row, index) {
op.dataEntity.load(row);
$(op.table).bootstrapTable('uncheckAll');
$(op.table).bootstrapTable('check', index);
handlerCallback.call(op.src, null, e, { oper: 'edit' });
$('#' + op.modal).modal("show");
}
}

View File

@ -74,6 +74,12 @@
if (data && data.success && data.oper === 'save' && data.data.ID === $('#userId').val()) {
$('#userDisplayName').text(data.data.DisplayName);
}
if (data && data.oper === 'create') {
$('#userName').removeProp('readonly').removeClass("ignore");
}
else if (data && data.oper === 'edit') {
$('#userName').prop('readonly', true).addClass("ignore");
}
}
});