<!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 rel="Stylesheet" href="/admin/drag/css/drag.frame.css">
    <link rel="Stylesheet" href="/admin/drag/fonts/iconfont.css">
    <!--颜色配置 style-->
    <link rel="stylesheet" href="/admin/drag/color/colorpicker.css" />
    <!--颜色配置 style-->

    <style>
    #ascrail2000{ z-index:10 !important;}
    .formatBox .box .name{height:34px; line-height:34px;}
    .formatBox .box .row{ font-size:12px;padding-left:60px;}
    .formatBox .box .row .tit{width: 50px;}
    .formatBox .box .inputInTex{margin:0px 5px 0px 0px;}
    .formatBox .box .textbox,
    .formatBox .box .drag-checkbox-style{margin:0 5px;}
    .formatBox .box .inputInTex font{left:0px;}
    .formatBox .box .inputInTex input[type=text]{width:30px;}
    .colorpickerField{float:left;margin:0 5px;}
    .colorpickerField input[type="text"]{ text-align: left;}
    .drag-btn-vice{padding:0 10px;height:34px; line-height: 34px;font-size:13px;}
    </style>
  
</head>
<body>
   	
    <div class="drag-setupBox">
    
        <div id="tab-box">
            
            <div class="formatBox">
            	
                <div class="box" style="padding:15px;">
                	
                    <div class="innerBox" id="set-title">
                       
                            <div class="name">标题设置</div>  
                            <div class="row">
                                <div class="tit">开启标题</div>
                                <input name="title" type="checkbox" value="" class="drag-checkbox d-none">
                                 
                                <div class="clear"></div>
                            </div>
                            <div id="title" class="d-none">
                            
                                <div class="row">
                                    <div class="tit">标题版式</div>
                                    <div class="clear"></div>
                                    <div class="select-title">
                                        <ul>
                                            <li data-value="1" class="active">
                                                <div class="li-ct"><img src="/admin/drag/images/title/title-style1.png" /></div>
                                            </li>
                                            <li data-value="2">
                                                <div class="li-ct"><img src="/admin/drag/images/title/title-style2.png" /></div>
                                            </li>
                                        </ul>
                                        <div class="clear"></div>
                                    </div>
                                </div>
                                
                                <div class="row">
                                    <div class="tit">标题文字</div>
                                    <input name="titleName" type="text" value="标题文字" style="width:195px; text-align:left; padding:0px 15px;">
                                </div>
                                <div class="row d-none" id="titleIntro">
                                    <div class="tit">标题介绍</div>
                                    <input name="titleIntro" type="text" value="标题介绍" style="width:195px; text-align:left; padding:0px 15px;">
                                </div>

                                <div class="row" id="titlePadding">    
                                    <div class="tit">内间距</div>
                                    <div class="clear"></div>
                                    <div class="inputInTex"><font>上</font><input name="paddingTop" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="inputInTex"><font>下</font><input name="paddingBottom" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="inputInTex"><font>左</font><input name="paddingLeft" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="inputInTex"><font>右</font><input name="paddingRight" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="clear"></div>
                                </div>
                                <div class="row" id="titleMargin">    
                                    <div class="tit">外间距</div>
                                    <div class="clear"></div>
                                    <div class="inputInTex"><font>上</font><input name="marginTop" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="inputInTex"><font>下</font><input name="marginBottom" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="inputInTex"><font>左</font><input name="marginLeft" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="inputInTex"><font>右</font><input name="marginRight" type="text" maxlength="3" value="0" class="integer"></div>
                                    <div class="clear"></div>
                                </div>

                                
                            </div>
                        </div><!--innerBox-->
                        <div class="format-line"></div>
                           
                        <div class="innerBox">
                            <div class="name">模块设置</div>
                            <div class="row" id="modulePadding">    
                                <div class="tit">内间距</div>
                                <div class="clear"></div>
                                <div class="inputInTex"><font>上</font><input name="paddingTop" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>下</font><input name="paddingBottom" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>左</font><input name="paddingLeft" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>右</font><input name="paddingRight" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="clear"></div>
                            </div>
                            <div class="row" id="moduleMargin">    
                                <div class="tit">外间距</div>
                                <div class="clear"></div>
                                <div class="inputInTex"><font>上</font><input name="marginTop" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>下</font><input name="marginBottom" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>左</font><input name="marginLeft" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>右</font><input name="marginRight" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="clear"></div>
                            </div>
                            
                            <div class="row clearfix">
                                <div class="tit">设置边框</div>
                                <input name="moduleBorder" type="checkbox" value="" class="drag-checkbox d-none">
                            
                            </div>
                            <div id="moduleBorder" class="d-none">
                                <div class="row clearfix">
                                    <div class="tit">边框大小</div>
                                    <div class="textbox"><input name="borderWidth" type="text" maxlength="3" value="1" class="integer"></div>
                                    <div class="clear h-10"></div>
                                </div>
                                <div class="row clearfix">
                                    <div class="tit">边框颜色</div>
                                    <div class="colorpickerField"><input name="borderColor" type="text" value="#e2e2e2" maxlength="7"></div>
                                
                                </div>
                            </div>
                            <div class="row clearfix">
                                <div class="tit">设置背景</div>
                                <input name="moduleBg" type="checkbox" checked="true" value="" class="drag-checkbox d-none">

                            </div>
                            <div id="moduleBg">
                                <div class="row clearfix">
                                    <div class="tit">背景色</div>
                                    <div class="colorpickerField">
                                        <input name="backgroundColor" maxlength="7" value="#ffffff" type="text">
                                    </div>
                                </div>
                                <div class="row clearfix">
                                    <div class="tit">背景图片</div>
                                   	<div class="textbox" style="margin-right: 5px;"><input name="backgroundImage" type="text" id="image1_text"></div>
                                    <button onclick="SelectFiles('image1')" class="drag-btn-vice">选择图片</button>

                                </div>
                                <div class="row row-image" id="image1"></div>
                                <div class="row clearfix">
                                    <div class="tit">背景设置</div>
                                    <select>
                                        <option value="m-bgSet1" selected>自适应</option>
                                        <option value="m-bgSet2">铺满</option>
                                        <option value="m-bgSet3">X轴铺满</option>
                                        <option value="m-bgSet4">Y轴铺满</option>
                                        <option value="m-bgSet5">左对齐</option>
                                        <option value="m-bgSet6">居中</option>
                                        <option value="m-bgSet7">右对齐</option>
                                    </select>
                                </div>
                            </div>
                            
                        
                        </div><!--innerBox-->
                        
						<div class="format-line"></div>   
                        <div class="innerBox" id="set-content">
                            <div class="name">内容设置</div>
                            <div class="row" id="contPadding">    
                                <div class="tit">内间距</div>
                                <div class="clear"></div>
                                <div class="inputInTex"><font>上</font><input name="paddingTop" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>下</font><input name="paddingBottom" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>左</font><input name="paddingLeft" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>右</font><input name="paddingRight" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="clear"></div>
                            </div>

                            <div class="row" id="contMargin">    
                                <div class="tit">外间距</div>
                                <div class="clear"></div>
                                <div class="inputInTex"><font>上</font><input name="marginTop" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>下</font><input name="marginBottom" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>左</font><input name="marginLeft" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="inputInTex"><font>右</font><input name="marginRight" type="text" maxlength="3" value="0" class="integer"></div>
                                <div class="clear"></div>
                            </div>
                            
                            <div class="row">
                                <div class="tit">设置边框</div>
                                <input name="contBorder" type="checkbox" value="" class="drag-checkbox d-none">
                               
                                <div class="clear"></div>
                            </div>
                            
                            <div id="contBorder" class="d-none">
                                <div class="row clearfix">
                                    <div class="tit">边框大小</div>
                                    <div class="textbox"><input name="borderWidth" type="text" maxlength="3" value="1" class="integer"></div>
                                </div>
                                <div class="row clearfix">
                                    <div class="tit">边框颜色</div>
                                    <div class="colorpickerField">
                                        <input name="borderColor" type="text" value="#e2e2e2">
                                    </div>
                                
                                </div>
                            </div>
                            <div class="row clearfix">
                                <div class="tit">设置背景</div>
                                <input name="contBg" type="checkbox" checked="true" class="drag-checkbox d-none">
                                <div class="clear"></div>
                            </div>
                            <div id="contBg">
                                <div class="row clearfix">
                                    <div class="tit">背景色</div>
                                    <div class="colorpickerField"><input name="backgroundColor" maxlength="7" type="text"></div>
                                </div>
                                <div class="row clearfix">
                                    <div class="tit">背景图片</div>
                                    <div class="textbox"><input name="backgroundImage" type="text" id="image2_text"></div>
                                    <button onclick="SelectFiles('image2')" class="drag-btn-vice">选择图片</button>
                                </div>
                            
                                <div class="row row-image" id="image2"></div>
                                <div class="row clearfix">
                                    <div class="tit">背景设置</div>
                                    <select>
                                        <option value="m-bgSet1" selected>自适应</option>
                                        <option value="m-bgSet2">铺满</option>
                                        <option value="m-bgSet3">X轴铺满</option>
                                        <option value="m-bgSet4">Y轴铺满</option>
                                        <option value="m-bgSet5">左对齐</option>
                                        <option value="m-bgSet6">居中</option>
                                        <option value="m-bgSet7">右对齐</option>
                                        
                                    </select>
                                </div>
                            </div>
                        </div><!--innerBox-->
                        
                        
                    </div>
                    
                
            </div><!--formatBox-->

            <div style="height:200px"></div>
        </div>

	</div>
   
   
   <script src="/admin/drag/js/utils.js"></script>
   <script>utils.loadJs(['jquery','judge','colorpicker','nicescroll'])</script>

	<script>
		
         //选择图片
        function SelectFiles(FieldID) {
             top.popup.open({
                    title:'选择文件', //窗口标题
                    area: ['800', '500'], //窗口大小 宽×高
                    drag:false, //是否支持拖动
                    shade:0.1, //灰色遮罩层透明度
                    scrollbar:false,//是否允许页面滚动
                    zIndex:11000000,
                    url:'../Include/SelectFile.aspx?fieldID=' + FieldID + '&showtype=vision',//指向链接
            });
        };

        //选择图片返回值
        top.SelectImgBack = function(Src,FieldID,WindowName){
            _id(FieldID+'_text').value = Src;
            $('#'+FieldID).html('<img src="'+Src+'" />');
            top.closePopup(WindowName);
            if(FieldID=='image1'){
                backgroundStyle('post','module');
            }else{
                backgroundStyle('post','cont');
            };
        };

		//获取编辑对象
		var $moduleObject = parent.$moduleObject;
		var $content = $moduleObject.find('[drag-module="content"]').first(); //内容对象
		var $title = $content.prev('[drag-module="title"]'); //标题对象

        if($content.length==0){
            $content = $moduleObject;
           $('#set-content,#set-title').remove();
        }

   		$(function(){			
			tabHeight();
		});
		$(window).resize(function(){
			tabHeight();
		});
		
		function tabHeight(){
			var tabHeight = $(window).height()-$('#tab').outerHeight();
			$('#tab-box').height(tabHeight);
			$("#tab-box").niceScroll({  
				cursorcolor:"rgba(0,0,0,0.3)",  
				cursoropacitymax:1,  
				touchbehavior:false,  
				cursorwidth:"6px",  
				cursorborder:"0", 
				cursorborderradius:"6px"  
			}); 
		};


        //标题配置
		//获取标题信息
		if($title.length!=0){
            if($title.css('display')!='none'){
    			var titleName = $title.find('span').text();
    			var titleIntro = $title.find('p').text();
    			var defaultTitleValue = $title.attr('class').split('m-title')[1]-1;
    			if(titleName){
    				$('input[name="titleName"]').val(titleName);
    			};
    			if(titleIntro){
    				$('input[name="titleIntro"]').val(titleIntro);
    			};
    			
    			$('.select-title').find('li').eq(defaultTitleValue).addClass('active').siblings().removeClass('active');

    			$('input[name="title"]').attr('checked',true);
    			$('#title').show();
    			if($('.select-title').find('.active').data('value')==2){
    				$('#titleIntro').show();
    			};

                //获取标题内间距
                paddingStyle('get','title');
                //获取标题内间距
                marginStyle('get','title');
 

            };
		};
		
		var titleValue = $('.select-title').find('.active').data('value');
		$('.select-title').on('click','li',function(){
			titleValue = $(this).data('value');
			$(this).addClass('active').siblings().removeClass('active');
			returnTitle();
            //获取标题内间距
            paddingStyle('get','title');
            //获取标题内间距
            marginStyle('get','title');

		});

		$('input[name="titleName"]').keyup(function(){
			var titleName = $('input[name="titleName"]').val();
            $title.find('span').html(titleName);
		});

        $('input[name="titleIntro"]').keyup(function(){
            var titleIntro = $('input[name="titleIntro"]').val();
            $title.find('p').html(titleIntro);
        });
		
        //标题返回
		function returnTitle(){
			var titleName = $('input[name="titleName"]').val();
			var titleIntro = $('input[name="titleIntro"]').val();
			if(titleValue==1){
				$('#titleIntro').hide();
				$title[0].outerHTML = '<div class="m-title1" drag-module="title">\n'+
									  '	<span>'+titleName+'</span>\n'+
									  '</div>\n';
			}else if(titleValue==2){
				$('#titleIntro').show();
				var titleIntro = $('input[name="titleIntro"]').val();
				$title[0].outerHTML = '<div class="m-title2" drag-module="title">\n'+
									  '	<span>'+titleName+'</span>\n'+
									  '	<p>'+titleIntro+'</p>\n'+
									  '</div>\n'
			};
			$title = $content.prev('[drag-module="title"]');

		};

        //返回标题内间距
        $('#titlePadding').find('input[type="text"]').keyup(function(){
            paddingStyle('post','title');
        });

        //返回标题外间距
        $('#titleMargin').find('input[type="text"]').keyup(function(){
            marginStyle('post','title');
        });

        //获取模块内间距
        paddingStyle('get','module');
        //获取内容内间距
        paddingStyle('get','cont');

        //返回模块内间距
		$('#modulePadding').find('input[type="text"]').keyup(function(){
            paddingStyle('post','module');
        });

        //返回内容内间距
        $('#contPadding').find('input[type="text"]').keyup(function(){
            paddingStyle('post','cont');
        });


        function paddingStyle(type,classify){
            if(classify=='module'){
                var $dom = $('#modulePadding');
                var $obj = $moduleObject;
            }else if(classify=="cont"){
                var $dom = $('#contPadding');
                var $obj = $content;
            }else if(classify=="title"){
                var $dom = $('#titlePadding');
                var $obj = $title;   
            };
            if(type=='get'){
                $dom.find('input[name="paddingTop"]').val($obj.css('padding-top').replace('px',''));
                $dom.find('input[name="paddingBottom"]').val($obj.css('padding-bottom').replace('px',''));
                $dom.find('input[name="paddingLeft"]').val($obj.css('padding-left').replace('px',''));
                $dom.find('input[name="paddingRight"]').val($obj.css('padding-right').replace('px',''));
            }else if(type='post'){
                var result = $dom.find('input[name="paddingTop"]').val()+'px '+$dom.find('input[name="paddingRight"]').val()+'px '+$dom.find('input[name="paddingBottom"]').val()+'px '+$dom.find('input[name="paddingLeft"]').val()+'px';
                $obj.css({padding:result});

            };
        };
		

        //获取模块内间距
        marginStyle('get','module');
        //获取内容内间距
        marginStyle('get','cont');
        
        //返回模块外间距
        $('#moduleMargin').find('input[type="text"]').keyup(function(){
            marginStyle('post','module');
        });
        
        //返回内容外间距
        $('#contMargin').find('input[type="text"]').keyup(function(){
            marginStyle('post','cont');
        });

        //获取外间距
        function marginStyle(type,classify){
            if(classify=='module'){
                var $dom = $('#moduleMargin');
                var $obj = $moduleObject;
            }else if(classify=="cont"){
                var $dom = $('#contMargin');
                var $obj = $content;
            }else if(classify=="title"){
                var $dom = $('#titleMargin');
                var $obj = $title;
            };
            if(type=='get'){
                $dom.find('input[name="marginTop"]').val($obj.css('margin-top').replace('px',''));
                $dom.find('input[name="marginBottom"]').val($obj.css('margin-bottom').replace('px',''));
                $dom.find('input[name="marginLeft"]').val($obj.css('margin-left').replace('px',''));
                $dom.find('input[name="marginRight"]').val($obj.css('margin-right').replace('px',''));
            }else if(type='post'){
                var result = $dom.find('input[name="marginTop"]').val()+'px '+$dom.find('input[name="marginRight"]').val()+'px '+$dom.find('input[name="marginBottom"]').val()+'px '+$dom.find('input[name="marginLeft"]').val()+'px';
                $obj.css({margin:result});
            };
        };

        //获取模块border
        borderStyle('get','module');
        //获取内容border
        borderStyle('get','cont');

        //返回模块border
        $('#moduleBorder').find('input[type="text"]').keyup(function(){
            borderStyle('post','module');
        });

        //返回内容border
        $('#contBorder').find('input[type="text"]').keyup(function(){
            borderStyle('post','cont');
        });

	    function borderStyle(type,classify){
            if(classify=='module'){
                var $dom = $('#moduleBorder');
                var $obj = $moduleObject;
            }else if(classify=="cont"){
                var $dom = $('#contBorder');
                var $obj = $content;
            };
            if(type=='get'){          
                var borderWidth = $obj.css('border-width').replace('px','');
                $dom.find('input[name="borderWidth"]').val(borderWidth);
                if(borderWidth!='0'){
                    $dom.show();
                    var name = $dom.attr('id');
                    $('input[name="'+name+'"]').attr('checked',true);
                };
                $dom.find('input[name="borderColor"]').val(parent.colorHexBack($obj.css('border-color')));
            }else if(type=='post'){
                
                var result = ''+$dom.find('input[name="borderWidth"]').val()+'px solid '+$dom.find('input[name="borderColor"]').val()+'';
                $obj.css({border:result});
                
               
            };
        };


        //获取模块样式
        backgroundStyle('get','module');
        backgroundStyle('get','cont');


        //修改背景样式
        $('#moduleBg').find('input[type="text"]').keyup(function(){
            backgroundStyle('post','module');
        });

        $('#contBg').find('input[type="text"]').keyup(function(){
            backgroundStyle('post','cont');
        });

        $('#moduleBg').find('select').change(function(){
            backgroundStyle('post','module');
        });

        $('#contBg').find('select').change(function(){
            backgroundStyle('post','cont');
        });


        //改变背景样式
        function backgroundStyle(type,classify){
            if(classify=='module'){
                var $dom = $('#moduleBg'),
                    $obj = $moduleObject,
                    $input = $('input[name="moduleBg"]'),
                    $imageTarget = $('#image1');
            }else if(classify=="cont"){
                var $dom = $('#contBg'),
                    $obj = $content,
                    $input = $('input[name="contBg"]'),
                    $imageTarget = $('#image2');
            };
            if(type=='get'){

                var backgroundColor = $obj.css('background-color');
                if(backgroundColor=='rgba(0, 0, 0, 0)'){
                    backgroundColor = 'none';
                }else{
                    backgroundColor = parent.colorHexBack(backgroundColor);
                };
                $dom.find('input[name="backgroundColor"]').val(backgroundColor);

                var backgroundImageUrl = $obj.css('background-image').replace('url("','').replace('")','').replace(location.origin,'');
                
                //检测是否带有背景图片
                if(backgroundImageUrl!='none'&&backgroundImageUrl.indexOf('/plus/ajaxlabel.aspx?action')==-1){
                    $dom.find('input[name="backgroundImage"]').val(backgroundImageUrl);

                    $imageTarget.html('<img src="'+backgroundImageUrl+'" />');
                };

                if(backgroundColor=='none'&&$dom.find('input[name="backgroundImage"]').val()==''){
                    $dom.hide();
                    $input[0].checked = false;
                };
                


            }else if(type="post"){
                var bgSelected = $dom.find('select')[0].value;
                
                var backgroundImageUrl = $dom.find('input[name="backgroundImage"]').val();
                if($.trim(backgroundImageUrl)!=''){
                   for(var i=0;i<8;i++){
                     $obj.removeClass('m-bgSet'+i);
                   };
                   $obj.addClass(bgSelected);
                };
                
                $obj.css({backgroundColor:$dom.find('input[name="backgroundColor"]').val(),backgroundImage:'url('+backgroundImageUrl+')'});

            };

        };
        
        //颜色配置
        $('.colorpickerField').each(function() {
              var $that = $(this).find('input[type="text"]');
              var color = $that.val();
              $that.before('<i class="colorpickerDot" style="background:'+color+'"></i>');
              $that.ColorPicker({ 
                  onBeforeShow: function () {
                      $(this).ColorPickerSetColor(this.value);
                  },
                  onChange: function (hsb, hex, rgb) {
                     $that.val('#'+hex);
                     $that.prev('.colorpickerDot').css({background:'#'+hex});

                     var thatParentId = $that.parents('.row').parent().attr('id');
                     if(thatParentId=='moduleBorder'){
                        //返回模块border
                        borderStyle('post','module');
                     }else if(thatParentId=='contBorder'){
                        //返回内容border
                        borderStyle('post','cont');
                     }else if(thatParentId=='moduleBg'){
                        //返回模块背景
                        backgroundStyle('post','module');
                     }else if(thatParentId=='contBg'){
                        //返回内容背景
                        backgroundStyle('post','cont');
                     };

                  }
              }).bind('keyup', function(){
                  $(this).ColorPickerSetColor(this.value);
              });
                

        });


		//正整数判断
		$('.integer').each(function() {
			$(this).integer();
			
   		});

		//开关
		$('.drag-checkbox').each(function() {		

			$(this).checkbox();
        });
		
		$('.drag-checkbox-style').on('click',function(){
			var checkName = $(this).attr('check-name');
            var speed = 300;
			//未选
			if($(this).attr('check-flag')==0){
				if(checkName=='title'){
					$title.attr('drag-saveDelete','true').fadeOut(300);
					$('#title').fadeOut(speed);
				}else if(checkName=='moduleBorder'){
					$('#moduleBorder').fadeOut(speed);
                    $moduleObject.css({border:'0'});
				}else if(checkName=='contBorder'){
                    $('#contBorder').fadeOut(speed);
                    $content.css({border:'0'});
                }else if(checkName=='moduleBg'){
                    $('#moduleBg').fadeOut(speed);
                    $moduleObject.css({background:'none'});
                }else if(checkName=='contBg'){
                    $('#contBg').fadeOut(speed);
                    $content.css({background:'none'});
                }
			}else{
				//选中
                if(checkName=='title'){
                    if($title.length==0){

                        $content.before('<div class="m-title1" drag-module="title">\n'+
                                        ' <span>标题文字</span>\n'+
                                        '</div>\n');
                        $title = $content.prev('[drag-module="title"]');
                        //获取标题内间距
                        paddingStyle('get','title');
                        //获取标题内间距
                        marginStyle('get','title');

                    }else{
                        $title.fadeIn(300);
                        $title.removeAttr('drag-saveDelete');
                        
                    };
                    $('#title').fadeIn(speed);
                }else if(checkName=='moduleBorder'){
                    //返回模块border
                    borderStyle('post','module');
                    $('#moduleBorder').fadeIn(speed);

                }else if(checkName=='contBorder'){
                    //返回内容border
                    borderStyle('post','cont');
                    $('#contBorder').fadeIn(speed);

                }else if(checkName=='moduleBg'){
                    //返回模块背景
                    backgroundStyle('post','module');
                    $('#moduleBg').fadeIn(speed);
                }else if(checkName=='contBg'){
                    //返回内容背景
                    backgroundStyle('post','cont');
                    $('#contBg').fadeIn(speed);
                }
			
			};
			
		});

    </script>


</body>
</html>