@model string
<div class="current-location">
    <ul>
        <li class="left"><i class="glyphicon glyphicon-home"></i><a href="javascript:void(0)" onclick="location.href=location.href">角色管理</a></li>
        <li class="right"><a href="javascript:void(0)" onclick="LoadData()" title="刷新"><span class="glyphicon glyphicon-refresh"></span></a></li>
    </ul>
</div>

<div class="main">
    <table class="tb-head" cellpadding="0" cellspacing="0" border="0">
        <tr class="form-group">
            <td class="controls left">
                <div class="btn-group btn-group-sm">
                    <button type="button" class="btn btn-default ui-selectInvert">反选</button>
                    <div class="btn-group btn-group-sm">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            菜单<span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="javascript:void(0)" class="ui-dialog" data-custom-params="title:'添加角色',url:'@Url.ActionUrl("add")?parent_guid=',width:'600px',height:'290px'">添加</a></li>
                            <li class="divider"></li>
                            <li><a href="javascript:void(0)" class="ui-deleteMultiple" data-custom-params="url:'@Url.ActionUrl("Delete")',callBack:'LoadData'">删除</a></li>
                        </ul>
                    </div>
                </div>
            </td>
            <td class="controls right form-inline form-group-sm">
                <select id="s_field" class="btn-xs ui-queryString ui-setName  form-control">
                    <option value="name">按名称搜索</option>
                    <option value="remark">按备注搜索</option>
                </select>
                <input type="text" id="name" name="name" class="form-control ui-queryString ui-keyword" placeholder="输入关键词" style="width:120px">
                <button type="button" class="btn btn-default btn-sm ui-queryString-search">搜索</button>
            </td>
        </tr>
    </table>
    <span class="help-block"></span>

    <table border=0 cellpadding=0 cellspacing=0 class="table table-bordered" id="tb_list">
        <thead>
            <tr>
                <td align="center" style="width:40px"><input type="checkbox" title="选择" class="ui-selectInvert" data-custom-params="isReverse:false,trigger:true"></td>
                <td align="center">名称</td>
                <td align="center">备注</td>
                <td align="center">超级管理员角色</td>
                <td align="center">权限设置</td>
                <td align="center">操作</td>
            </tr>
        </thead>
            <tr class="item list-template-item" id="item_{id}">
                <td align="center"><input type="checkbox" value="{id}" class="checked-item is_superadmin_{isSuperadmin}"></td>
                <td align="center">{name}</td>
                <td align="center" style="color:#666">{remark}</td>
                <td align="center"><span class="is-{isSuperadmin}"></span></td>
                <td align="center"><a href="javascript:void(0)" class="btn btn-default btn-sm ui-dialog is_superadmin_{isSuperadmin}" data-custom-params="title:'{name}-权限设置',url:'@Url.ActionUrl("Index","RolePermissions")?roleId={id}'">设置</a></td>
                <td align="center">
                    <input type="hidden" name="id" value="{id}" />
                    <div class="btn-group btn-group-sm">
                        <a href="javascript:void(0)" class="btn btn-default btn-sm ui-dialog" data-custom-params="title:'修改角色',url:'@Url.ActionUrl("Edit")?id={id}',width:'600px',height:'290px'">修改</a>
                        <a href="javascript:void(0)" class="btn btn-default btn-sm ui-deleteSingle is_superadmin_{isSuperadmin}" data-custom-params="url:'@Url.ActionUrl("Delete")',callBack:'LoadData'">删除</a>
                    </div>
                </td>
            </tr>
</table>
</div>
<script type="text/javascript">
    function LoadData()
    {
        var url = "@Url.ActionUrl("ListData")"
        $("#tb_list").ListBind({ url: url, callBack: "LoadedInit" });
    }
    function LoadedInit()
    {
        $(".is_superadmin_1").attr("disabled", "disabled");
    }
    LoadData();
</script>



