diff --git a/Bootstrap.Admin/Content/js/framework.js b/Bootstrap.Admin/Content/js/framework.js index a06ab190..9ae09151 100644 --- a/Bootstrap.Admin/Content/js/framework.js +++ b/Bootstrap.Admin/Content/js/framework.js @@ -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"); } } diff --git a/Bootstrap.Admin/Scripts/Users.js b/Bootstrap.Admin/Scripts/Users.js index 3e95879e..4c191c3b 100644 --- a/Bootstrap.Admin/Scripts/Users.js +++ b/Bootstrap.Admin/Scripts/Users.js @@ -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"); + } } });