<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SimonMasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%: Html.Language("RolesMgmt")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="easyui-layout" data-options="fit:true">
        <div region="north" data-options="border:false">
            <div class="toolbar">
                <a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="loadRoles()">
                    <%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-add"
                        onclick="add()">
                        <%: Html.Language("New")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-edit"
                            onclick="edit()">
                            <%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-remove"
                                onclick="delData()">
                                <%: Html.Language("Delete")%></a>
            </div>
        </div>
        <div region="center" border="false">
            <table id="rolelist" class="role-list" width="100%">
            </table>
        </div>
        <div data-options="region:'east',border:false" style="width: 250px; border-left: 1px solid #95B8E7;">
            <%--<div class="toolbar">
                <a href="javascript:void(0)" class="toolbar-button tb-icon-add" onclick="group.add()">
                    <%: Html.Language("New")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-edit"
                        onclick="group.edit()">
                        <%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-remove"
                            onclick="group.del()">
                            <%: Html.Language("Delete")%></a>
            </div>--%>
            <table id="groupTree" class="easyui-treegrid" data-options="
					url: '/SysHotel/LoadSysHotelGroupTree/',
					method: 'post',
					idField: 'ID',
					treeField: 'Name',
					fit: true,
					fitColumns: true,
					animate: true,
					border: false,
					loadMsg: 'load......',
					bodyCls: 'easyui-treegrid-no-icon',
                    onLoadSuccess: function (row, data) {if (data[0] != null) {$('#groupTree').treegrid('select', data[0].ID);}},
					onSelect: groupTreeOnSelect
				">
                <thead>
                    <tr>
                        <th data-options="field:'Name',width:160">
                            <%: Html.Language("Name")%>
                        </th>
                        <th data-options="field:'Sort',align:'center',width:40">
                            <%: Html.Language("Sort")%>
                        </th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
    <div id="dialog" class="easyui-window" style="padding: 5px; z-index: 19999;" data-options="
			closed: true,
			modal: true,
			collapsible: false,
			minimizable: false,
			maximizable: false,
            draggable: true
		">
        <div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
        </div>
        <div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
            <a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)">
                <%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
                    href="javascript:void(0)" onclick="$('#dialog').window('close');">
                    <%: Html.Language("Cancel")%></a>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript" src="/Scripts/sys-role-group-index.js"></script>
    <% switch ((int)Session["isCN"])
       {
           case 1: %>
    <script type="text/javascript" src="/Scripts/en-US.js"></script>
    <% break;
       case 2: %>
    <script type="text/javascript" src="/Scripts/zh-TW.js"></script>
    <% break;
       default: %>
    <script type="text/javascript" src="/Scripts/zh-CN.js"></script>
    <% break;
       } %>
    <style type="text/css">
        .role-list
        {
            font-size: 12px;
            border-collapse: collapse;
        }
        .role-list tr
        {
            cursor: default;
        }
        .role-list .selected
        {
            background: #8ED5F5;
        }
        .role-list tr:hover
        {
            background: #8ED5F5;
        }
        .role-list .item-header
        {
            width: 50px;
            height: 50px;
            text-align: center;
            vertical-align: middle;
        }
        .role-list h3
        {
            margin: 7px 0px;
        }
    </style>
</asp:Content>
