<%@ Page Language="C#" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.drag.Index" Codebehind="Index.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit"> 
  <title>可视化编辑</title>
  <link type="text/css" rel="Stylesheet" href="/admin/drag/css/drag.frame.css">
  <link type="text/css" rel="Stylesheet" href="/admin/drag/fonts/iconfont.css">
  <!--Kesion popup style-->
  <link type="text/css" rel="Stylesheet" href="/ks_inc/popup/css/kesion.popup.css">
  <!--// Kesion popup style-->
  <script>
        var tpDir = "<%= templateDir%>";
        var templatePath = "<%= templateDir%>/<%=tempaltePath%>";
        var tpType = "<%=tpType%>";   
        var manageDir = "/<%=MyCache.GetCacheConfig(4)%>/";
        var skinId = <%=skinID %>;
        var isDeBug = 0;   
  </script>
</head>
<body style="overflow:hidden;">
   
    <div id="pageHead" class="drag-pageHead">
   	   <div class="f-r">
        	<div class="button" onClick="saveThisPage()">保存</div>
        	<div class="button default" onClick="pagePreview()">预览</div>
            
            <div class="head-preview">
            	<div class="p-box">
                    <div class="tips">请先选择要预览的栏目</div>
                    <ul id="previewItem"></ul>
                </div>
            </div>
            
       		<div class="select" id="selectPage"><i class="drag-font drag-i-xia"></i><i class="drag-font drag-i-list2"></i><%=tempalteFileName %></div>
            <div class="select-box" id="select-box">
            	<ul>
                    <%=xmlMenu.ToString() %>
                </ul>
            </div>
       </div>
   	   <div class="f-l" id="headSetTab">
        	<span onClick="openSetWindow(this,'/<%=MyCache.GetCacheConfig(4)%>/drag/module/set-website.aspx')"><i class="drag-font drag-i-config"></i>网站基本配置</span>
        	<span onClick="openSetWindow(this,'/<%=MyCache.GetCacheConfig(4)%>/drag/module/set-page.aspx')"><i class="drag-font drag-i-page"></i>当前模板配置</span>
        	<span onClick="openSetWindow(this,'/<%=MyCache.GetCacheConfig(4)%>/drag/module/style-list.aspx')"><i class="drag-font drag-i-style2"></i>风格管理</span>
            <span onClick="openSetWindow(this,'/<%=MyCache.GetCacheConfig(4)%>/drag/module/colorConfig.aspx')"><i class="icon-color"></i>颜色配置</span>
        </div>
        
    </div>
	
    <div class="pageLeft-set">
    	<!--设置窗口-->	
	</div>	
	
    <div class="wraper">
        <div id="pageLeft" class="pageLeft">
            <div class="btn-close" onClick="closeLeft(this)"><i class="drag-font drag-i-left"></i></div>
            <div class="tab" id="leftTab">
            	<i class="line"></i>
            	<ul>
                	<li class="active"><i class="drag-font drag-i-xuanzezujian"></i>模块</li>
                	<li><i class="drag-font drag-i-mobantongji"></i>版式</li>
                </ul>
            </div>
            
            <div class="tabbox" id="selectCont">     
            	<div class="tab-tips-bg"></div>
            	<div class="box">
                    <div class="small-tit"><i class="drag-font drag-i-xiangxia"></i>标签（教育）</div>
                    <ul class="clearfix">
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.CosList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="网授课程列表"><i class="drag-font drag-i-kecheng1"></i>网授课程</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.CosFaceList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="面授课程列表"><i class="drag-font drag-i-are-taught"></i>面授课程</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.CosTeacherList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="名师列表"><i class="drag-font drag-i-laoshidayi"></i>名师列表</li>
                      
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.AskList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="问吧问题列表"><i class="drag-font drag-i-wenti1 fz19"></i>问吧问题</li>
                       <!--  <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.AskZJList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="问吧专家列表"><i class="drag-font drag-i-zhuanjia fz19"></i>问吧专家</li> -->
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.SJList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="试卷列表"><i class="drag-font drag-i-ykq_tab_shijuan"></i>试卷列表</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.SJReviews.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="考后心得列表"><i class="drag-font drag-i-xiaolian"></i>考后心得</li>
                    </ul>
                    <div class="small-tit"><i class="drag-font drag-i-xiangxia"></i>标签（商城）</div>
                    <ul class="clearfix d-none">
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ProList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="商品列表"><i class="drag-font drag-i-shangpin"></i>商品列表</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ProLimitBuyList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="抢购商品列表"><i class="drag-font drag-i-qianggou fz19"></i>抢购商品</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ProLimitBuyItemList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="抢购项目列表"><i class="drag-font drag-i-xiangmu"></i>抢购项目</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ProBrandList.aspx?from=drag&labeltype=2&templateId='+skinId)" title="品牌列表"><i class="drag-font drag-i-pinpaishezhi"></i>品牌列表</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ProGroupBuyList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="团购商品列表"><i class="drag-font drag-i-wenzhang"></i>团购商品</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ViewHistoryList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="最近浏览商品列表"><i class="drag-font drag-i-121"></i>最近浏览</li>
                    </ul>
                    <div class="small-tit"><i class="drag-font drag-i-xiangxia"></i>标签（基础）</div>
                    <ul class="clearfix d-none">
                         <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.Intelligent.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="自定义文档列表"><i class="drag-font drag-i-active"></i>文档列表</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.ViewHistoryList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="最新浏览过的文档"><i class="drag-font drag-i-time"></i>最新浏览</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.SpecialList.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="专题列表"><i class="drag-font drag-i-nav"></i>专题列表</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.Link.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="友情链接列表"><i class="drag-font drag-i-lianjie"></i>友情链接</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.Announce.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="公告列表"><i class="drag-font drag-i-gonggao"></i>公告列表</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.Class.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')" title="课程、试卷、内容、电商分类的导航列表"><i class="drag-font drag-i-fenlei"></i>分类导航</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.Navigation.aspx?from=drag&labeltype=1&templateId='+skinId,'modular')" title="当前位置导航"><i class="drag-font drag-i-daohang1"></i>位置导航</li>
                        <!--<li onClick="Drag.Select('lable',manageDir+'label/KS.Label.SQL.aspx?from=drag&labeltype=3&templateId='+skinId,'modular')" title="SQL标签"><i class="drag-font drag-i-sql fz21" style="font-weight:normal"></i>SQL标签</li>-->
                    </ul>
 
                    <div class="small-tit"><i class="drag-font drag-i-xiangxia"></i>普通</div>
                    <ul class="clearfix d-none">
                        <li onClick="Drag.Select('html','/<%=MyCache.GetCacheConfig(4)%>/drag/module/set-html.aspx','modular')"><i class="drag-font drag-i-fileshtml"></i>html元素</li>
                        <li onClick="Drag.Select('lable',manageDir+'label/KS.Label.SlideNew.aspx?from=drag&labeltype=2&templateId='+skinId,'modular')"><i class="drag-font drag-i-lunbotuzujian"></i>轮播图</li>
                        
                    </ul>
                    
                </div>
                <div class="box" style="display:none;">
                    <div class="small-tit"><i class="drag-font drag-i-xiangxia"></i>头部/底部</div>
                    <ul class="clearfix">
                        <li onClick="Drag.Select('header','/<%=MyCache.GetCacheConfig(4)%>/drag/module/staticLabel.aspx?type=add&module=header','format')"><i class="drag-font drag-i-config"></i>插入头部</li>
                        <li onClick="Drag.Select('footer','/<%=MyCache.GetCacheConfig(4)%>/drag/module/staticLabel.aspx?type=add&module=footer','format')"><i class="drag-font drag-i-config"></i>插入底部</li>
                    </ul>
                    <div class="small-tit"><i class="drag-font drag-i-xiangxia"></i>内容</div>
                    <ul class="clearfix">
                        <li onClick="Drag.Select('format','/<%=MyCache.GetCacheConfig(4)%>/drag/module/format.aspx?formatID=1','format')"><i class="icon-format icon-format1"></i>版式一</li>
                        <li onClick="Drag.Select('format','/<%=MyCache.GetCacheConfig(4)%>/drag/module/format.aspx?formatID=2','format')"><i class="icon-format icon-format2"></i>版式二</li>
                        <li onClick="Drag.Select('format','/<%=MyCache.GetCacheConfig(4)%>/drag/module/format.aspx?formatID=3','format')"><i class="icon-format icon-format3"></i>版式三</li>
                        <li onClick="Drag.Select('format','/<%=MyCache.GetCacheConfig(4)%>/drag/module/format.aspx?formatID=4','format')"><i class="icon-format icon-format4"></i>版式四</li>
                    </ul>
                </div>
            </div>
            
        </div>
        
        <div id="pageCont">
            <div class="x-axis" id="x-axis"></div>
            <div id="pageLoad"><i class="icon-load"></i></div>
            <iframe src="" height="100%" width="100%" id="pageMain" name="dragmain" style="border:0px;"></iframe>
        </div>

	</div>
        

    <!--实时窗口-->
    <div id="realTimeBox" class="realTimeBox d-none">
		<div class="title"><span class="close" onClick="closeStyle()"><i class="drag-font drag-i-guanbi"></i></span><strong>修改样式</strong></div>
        <iframe width="100%" height="100%" name="realTime" id="realTime"></iframe>
        
    </div>
    
   
    <script src="/admin/drag/js/utils.js"></script>
    <script>utils.loadJs(['jquery','popup','dragLoad','nicescroll'])</script>

	<script>

        var frame = new utils.page({
            ready:function(){
                
                document.getElementById('select-box').style.height = window.innerHeight-45+'px';
                $('#select-box').on('click','.folder-name',function(){
                    $(this).toggleClass('folder-name-on');
                    $(this).next('.folder-box').stop().slideToggle(300);
                });

                $('#leftTab').on('click','li',function(){
                    var i = $(this).index();
                    var domClass = $(this).attr('class');
                    if(domClass!='disabled'){
                        $(this).addClass('active').siblings().removeClass('active');
                        $('#selectCont').find('.box').eq(i).fadeIn(300).siblings().hide();
                    };
                });
                $('#selectCont').on('click','.small-tit',function(){
                    $(this).next('ul').slideToggle(200);
                });    
                
                $('#selectPage').click(function(e){
                    $('#select-box').fadeToggle(300);
                    e.stopPropagation();
                });
                $('#select-box').click(function(e){
                     e.stopPropagation();
                });
                $(document).click(function(){
                    $('#select-box').stop().fadeOut(300);
                });

                this.axis();
                this.nicescroll('#select-box','#cacaca'); 
                this.nicescroll('#selectCont','#cacaca'); 
 
            },
            resize:function(){
                document.getElementById('select-box').style.height = window.innerHeight-45+'px';
            },
            axis:function(){
                for(var i=0;i<30;i++){
                    var num = i*100;
                    $('#x-axis').append('<span><em>'+num+'</em></span>')
                };
            },
            nicescroll:function(obj,color){
                $(obj).niceScroll({  
                    cursorcolor:color,  
                    cursoropacitymax:1,  
                    touchbehavior:false,  
                    cursorwidth:"6px",  
                    cursorborder:"0", 
                    cursorborderradius:"10px"  
                });
            }

        });
       
    </script>


</body>
</html>