@using System.Web.Optimization;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>九平米管理软件</title>   
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="~/Content/tlebootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/font-awesome.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/ionicons.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="~/Content/tledist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="~/Content/tleplugins/morris/morris.css">
    <link rel="stylesheet" href="~/Content/tleplugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <link rel="stylesheet" href="~/Content/tleplugins/datepicker/datepicker3.css">
    <link rel="stylesheet" href="~/Content/tleplugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="~/Content/tleplugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    @Styles.Render("~/Content/themes/base/css")
    @Styles.Render("~/Content/css")
    <link rel="stylesheet" href="~/Content/Site.css?vn=20180813" />
    <script src="~/Scripts/jquery-2.2.4.min.js"></script>
    <script src="~/Scripts/jquery-ui-1.11.4.min.js" type="text/javascript"></script>
    @Scripts.Render("~/bundles/jQuery.BlockUI")
    @Scripts.Render("~/bundles/jqueryform")
    <script src="~/Scripts/common.js?vn=20180813" type="text/javascript"></script>
    @Scripts.Render("~/bundles/inputmask")
    @Scripts.Render("~/bundles/ajaxfileupload")
    <link href="/Content/jquery-ui.icon-font.css" rel="stylesheet">
    <script src="../../Scripts/highcharts.js"></script>
</head>
<body class="hold-transition skin-blue-light fixed sidebar-mini">
    <div class="wrapper">
        @{Com._9pm2.ClientWeb.Models.PortalUser user = Session["PortalLoginUser"] as Com._9pm2.ClientWeb.Models.PortalUser;}
        <header class="main-header">
            <!-- Logo -->
            <a target="_blank" href="http://www.jiupingmi.cn" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>@user.CompanyName</b></span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>@user.CompanyName</b></span>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top">
                <!-- Sidebar toggle button-->
                <a href="javascript:void(0);" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <li class="user user-menu">
                            <a href="javascript:void(0);">
                                <span>
                                    Hello， @(user == null ? "" : user.CustomerShortName)
                                </span>
                            </a>
                        </li>
                        <!-- Messages: style can be found in dropdown.less-->                
                        <li><a href='/Portal/Logout' onclick="return confirm('确定要退出吗？')">退出</a></li>
                    </ul>
                </div>
            </nav>
        </header>
        <aside class="main-sidebar">
            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">
                <!-- Sidebar user panel -->
                <!-- /.search form -->
                <!-- sidebar menu: : style can be found in sidebar.less -->
                <ul class="sidebar-menu">
                    @if (user != null)
                    {
                        <li class="treeview">
                            <a class="text-black" href="javascript:void(0);">
                                <i class="fa fa-file-text-o"></i> <span>订单管理</span>
                                <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href='/Portal/Index'><i class="fa fa-circle-o"></i>订单查询</a></li>                                
                                <li><a href='/Portal/CreateOrder'><i class="fa fa-circle-o"></i>新增订单</a></li>
                            </ul>
                        </li>
                            <li class="treeview">
                                <a class="text-black" href="javascript:void(0);">
                                    <i class="fa fa-calendar-check-o"></i> <span>个人中心</span>
                                    <span class="pull-right-container">
                                        <i class="fa fa-angle-left pull-right"></i>
                                    </span>
                                </a>
                                <ul class="treeview-menu">
                                    <li class=""><a href='/Portal/Account'><i class="fa fa-circle-o"></i>账号信息</a></li>         
                                    <li class=""><a href='/Portal/ChangePassword'><i class="fa fa-circle-o"></i>更改密码</a></li>                
                                </ul>
                            </li>
                    }
                </ul>
            </section>
            <!-- /.sidebar -->
        </aside>
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                    @ViewBag.Title
                    <small></small>
                </h1>
            </section>
            <!-- Main content -->
            <section class="content">
                @RenderBody()
            </section>
        </div>
        <div id="iframeDiv" style="display: none">
            <iframe src="/Home/State" height="0" width="0"></iframe>
        </div>
    </div>
    <script>
            $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
    <script src="~/Content/tleplugins/morris/morris.min.js"></script>    
    <script src="~/Content/tleplugins/sparkline/jquery.sparkline.min.js"></script>    
    <script src="~/Content/tleplugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="~/Content/tleplugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>    
    <script src="~/Content/tleplugins/knob/jquery.knob.js"></script>
    <script src="~/Content/tleplugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>    
    <script src="~/Content/tleplugins/slimScroll/jquery.slimscroll.min.js"></script>    
    <script src="~/Content/tleplugins/fastclick/fastclick.js"></script>    
    <script src="~/Content/tledist/js/app.min.js"></script>
    <script>
        var url = location.href.toLowerCase();
        var lis = $(".sidebar-menu").find("li");
        $(lis).removeClass("active");
        var links = $(".treeview-menu").find("a");
        $(links).removeClass("active");
        $(links).each(function (i, v) {
            var u = v.href.toLowerCase();
            console.log(u);
            console.log(url);
            console.log(url.indexOf(u));
            if (u!= "#" && url.indexOf(u) >= 0) {
                $(v).parent().addClass("active");
                $($(v).parent().parent().parent()).addClass("active");
                return;
            }
        });
    </script>
</body>
</html>
