完善事件权限管理
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
{
|
||||
var l2 = Model.FindAll(s => s.PId == m1.Id && s.IsHide != 1);
|
||||
<li>
|
||||
<a href="/AdminCP/@(m1.Link)" id="@m1.MenuKey" @(m1.Link != "#" ? "class=J_menuItem" : "") >
|
||||
<a href="@(m1.Link=="#"?"javascript:;":"/AdminCP/"+m1.Link)" id="@m1.MenuKey" @(m1.Link != "#" ? "class=J_menuItem" : "")>
|
||||
@if (!string.IsNullOrWhiteSpace(m1.ClassName))
|
||||
{
|
||||
<i class="fa @m1.ClassName"></i>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">禁用:</label>
|
||||
<div class="col-sm-8">
|
||||
<label>
|
||||
<label class="checkbox-inline i-checks">
|
||||
<input type="checkbox" value="1" name="IsDisable" id="IsDisable"> 禁用
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
@model TargetEvent
|
||||
@{
|
||||
ViewBag.title = "查看/编辑权限事件";
|
||||
}
|
||||
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@(ViewBag.title)</h5>
|
||||
<div class="ibox-tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "editEventKeyForm", @class = "form-horizontal m-t" }))
|
||||
{
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">事件key:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="EventKey" name="EventKey" minlength="2" maxlength="50" type="text" class="form-control" required aria-required="true" value="@Model.EventKey">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">事件名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="EventName" type="text" class="form-control" name="EventName" required aria-required="true" value="@Model.EventName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="Rank" type="number" class="form-control" name="Rank" value="@Model.Rank" required aria-required="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">禁用:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline i-checks">
|
||||
<input type="checkbox" value="1" name="IsDisable" id="IsDisable" @(Model.IsDisable == 1 ? "checked" : "")> 禁用
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-4 col-sm-offset-3">
|
||||
<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 提交 </button>
|
||||
<button class="btn btn-default" type="button" onclick="closethisdialog();"><i class="fa fa-close"></i> 取消 </button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
DoPost("editEventKeyForm");
|
||||
})
|
||||
</script>
|
||||
@@ -68,8 +68,6 @@
|
||||
cardView: false, //是否显示详细视图
|
||||
detailView: false, //是否显示父子表
|
||||
columns: [{
|
||||
checkbox: true
|
||||
}, {
|
||||
field: 'EventName',
|
||||
title: '事件名称'
|
||||
}, {
|
||||
@@ -80,8 +78,22 @@
|
||||
title: '排序'
|
||||
}, {
|
||||
field: 'IsDisable',
|
||||
title: '是否禁用'
|
||||
}, ]
|
||||
title: '是否禁用',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="label label-primary">启用</span>';
|
||||
} else {
|
||||
return '<span class="label label-danger">禁用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'Id',
|
||||
title: '操作',
|
||||
formatter: 'actionFormatter',
|
||||
width: 140
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
@@ -96,7 +108,12 @@
|
||||
};
|
||||
return oTableInit;
|
||||
};
|
||||
|
||||
function actionFormatter(value, row, index) {
|
||||
return [
|
||||
'<a href="javascript:;" class="btn btn-xs btn-primary" title="编辑" onclick="top.showDialog(\'eidtEventKey\', \'编辑事件权限详情\', \'/AdminCP/Permission/EditEventKey/' + value + '\', 0, 0)"><i class="fa fa-edit"></i> 编辑</a>',
|
||||
'<a href="javascript:;" class="btn btn-xs btn-danger m-l-xs" title="删除" onclick="doDel(\'/AdminCP/Permission/DelEventKey\',' + value + ');"><i class="fa fa-close"></i> 删除</a>',
|
||||
].join('');
|
||||
}
|
||||
|
||||
var ButtonInit = function () {
|
||||
var oInit = new Object();
|
||||
|
||||
Reference in New Issue
Block a user