<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frame.aspx.cs" Inherits="VA.FX.Web.entry.frame" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><% = base.webSiteConfig.WebSiteName%></title>
<link rel="stylesheet" type="text/css" href="/app_themes/default/css/basic.css" />
<link rel="stylesheet" type="text/css" href="/app_themes/default/css/entry.css" />
<link rel="stylesheet" type="text/css" href="/app_themes/default/css/entry-menu.css" />
<link rel="stylesheet" type="text/css" href="/uicontrols/easyui/themes/default/easyui.css" />
<!--<link rel="stylesheet" type="text/css" href="/uicontrols/easyui/themes/icon.css" />-->
<link rel="stylesheet" type="text/css" href="/jtongui/themes/icon.css" />
<script type="text/javascript" src="/uicontrols/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/uicontrols/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/uicontrols/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/scripts/page/entry_frame.js"></script>
<script type="text/javascript">   
    $(function () {
        init();
    });
</script>

</head>

<body>   

    <div id="header">
        <div id="logo"></div>
        <ul id="topestMenu">
            <%--<li><img src="../app_themes/default/images/menu/topm_icon_1.jpg" border="0" /><input type="hidden" value="通讯录" /></li>
            <li><img src="../app_themes/default/images/menu/topm_icon_2.jpg" border="0" /><input type="hidden" value="模型管理" /></li>                                            
            <li><img src="../app_themes/default/images/menu/topm_icon_3.jpg" border="0" /><input type="hidden" value="模块设计" /></li>
            <li><img src="../app_themes/default/images/menu/topm_icon_4.jpg" border="0" /><input type="hidden" value="图纸打印" /></li>
            <li><img src="../app_themes/default/images/menu/topm_icon_5.jpg" border="0" /><input type="hidden" value="文件管理" /></li>--%>

            <asp:Repeater ID="rpModules" runat="server">
            <ItemTemplate>
            <li><img src="../sysmembership/Upload/IconModule/<%# Eval("Icon")%>" border="0" /><input type="hidden" value="<%# Eval("ModuleName")%>" /></li>
            </ItemTemplate>
            </asp:Repeater>

        </ul>
        <div id="headerRight">
            <div class="topmenu"><a href="javascript:help();" class="help">帮助</a> | <a href="javascript:logout();">退出</a> | <a href="javascript:addTab('修改密码','../sysmembership/ChangeMyPassword.aspx');">修改密码</a> | <a href="about.aspx">关于</a></div>
            <div class="userinfo"><% = base.UserID %></div>
        </div>
    </div>
    <div id="sideBar">
        <div id="menus">

        <div id="topestMenuName">
            <span id="topestMenuName_text">通讯录</span>
        </div>

        <!--模块-->
        <asp:Repeater ID="rpModules2" runat="server" OnItemDataBound="rpModules2_ItemDataBound">
        <ItemTemplate>
        <div id="topestMenuContent<%# Container.ItemIndex %>" class="topestMenu-content<%# SetModuleClass(Container.ItemIndex) %>">

            <!--1级节点权限-->
            <asp:Repeater ID="rpPrivsLevel0" runat="server">
            <ItemTemplate>                
                <div class="submenu<%# SetPriv0Class(Container.ItemIndex) %>">
		            <h1 class="head"><%# Eval("PrivilegeName")%></h1>
		            <div class="body">
			            <ul>

                            <!--2级节点权限-->
                            <asp:Repeater ID="rpPrivsLevel1" runat="server">
                            <ItemTemplate>    
                                <li><a href="javascript:addTab('<%# Eval("PrivilegeName")%>','<%# Eval("DefaultPageURL")%>');"><%# Eval("PrivilegeName")%></a></li>				                                        
                            </ItemTemplate>
                            </asp:Repeater>
                        </ul>
		            </div>
	            </div>                        
            </ItemTemplate>
            </asp:Repeater>

        </div>
        </ItemTemplate>
        </asp:Repeater>     

        </div><!--menus.END-->
    </div>
    <div id="switchBar"></div>
    <div id="main">
        <div class="easyui-tabs" style="width:300px;border-bottom:0px;overflow:hidden;" fit=true id="tabs1" >
            <div title="首页" data-options="closable:false">            
                <iframe src="welcome.html" style="width:100%;height:100%;border:0px;margin:0px;padding:0px;"  ></iframe>                
            </div>
        </div>
    </div>
    <div id="footer">
        <div class="dateinfo">&nbsp;&nbsp;<% = DateTime.Now.ToString("yyyy年MM月dd日") %>&nbsp;&nbsp;<% = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(DateTime.Now.DayOfWeek) %></div>
        <div class="copyright">服务电话：400-666-0008，网址：<a href="#" target="_blank">http://www.jtongtech.com</a></div>
    </div>

    <div id="contextMenu" class="easyui-menu" data-options="onClick:menuHandler" style="width:120px;">
	    <div data-options="name:'closeCurrent'">关闭</div>
	    <div data-options="name:'closeAll'">关闭全部</div>
        <div data-options="name:'closeAllExceptCurrent'">除此之外全部关闭</div>
    </div>

    <script type="text/javascript">
        function menuHandler(item) {
            var tabs = $('#tabs1').tabs("tabs"); //注意：返回的是dom对象，不是JQuery对象；
            var selectedTab = $('#tabs1').tabs('getSelected');
            var selectedTabIndex = $('#tabs1').tabs('getTabIndex', selectedTab);
            var selectedTabTitle = selectedTab.panel('options').tab.text();

            if (item.name == "closeCurrent") {
                $('#tabs1').tabs('close', selectedTabTitle);
            }
            else if (item.name == "closeAll") {
                var tabTitles = new Array();
                for (var i = 0; i < tabs.length; i++) {
                    var title = tabs[i].panel('options').tab.text();
                    tabTitles.push(title);
                }
                for (var i = 0; i < tabTitles.length; i++) {
                    $("#tabs1").tabs("close", tabTitles[i]);
                }
            }
            else if (item.name == "closeAllExceptCurrent") {
                var tabTitles = new Array();
                for (var i = 0; i < tabs.length; i++) {
                    var title = tabs[i].panel('options').tab.text();
                    if (title != selectedTabTitle) {
                        tabTitles.push(title);
                    }
                }
                for (var i = 0; i < tabTitles.length; i++) {
                    $("#tabs1").tabs("close", tabTitles[i]);
                }
            }
        }
    </script>     
</body>  

</html>
