{header:author/inc_header.html}
{header:author/inc_toper.html}
{header:author/inc_nav.html}
<script>
$(document).ready(function(){
	$("#main-bar").find("li").eq("1").addClass("act");
});
</script>
<link rel="stylesheet" type="text/css" href="{templates}/static/css/author/novellist.css">
<style>
.select{border: 1px solid #DDDDDD;height: 30px;outline: none !important;cursor: pointer;visibility: inherit;}
.save{cursor: pointer;}
</style>

<div class="mainRight fl">
    <div class="crumbsWrap">
    	<i class="before"><a href="{小说作品列表}"><span>小说管理</span></a></i><em class="same"></em>
		<i class="current"><span>{名字}</span></i>
    </div>
    <div class="msgBoxTitle">
	    {cur:vid>0}
    	<a id="createVolumeIconBtn" class="button white" href="{小说新建分卷}">新建分卷</a>
    	{/cur}
    	<a class="create button" href="{小说新建草稿}"><em class="icon"></em>新建章节</a>
        <div class="tabSwitch cf">
            <span><a href="{编辑小说}">编辑作品信息</a></span>
            <span><a href="{小说草稿箱列表}">草稿箱</a></span>
            <span class="act"><a href="{小说分卷列表}">分卷管理</a></span>
            <span><a href="{小说章节列表}">章节管理</a></span>
        </div>
    </div>
    
    <div class="managerWrap cf">
        <div class="mRightContent fl" style="width: 1040px;">
            <div class="midWrap editWrap">
                <form id="form" name="form" method="post">
				{隐藏表单}
                    <div class="sectionViewWrap">
                        <div>
                        	<div class="sectionBtnBox cf" style="width: 96%;">
	                            <div class="titleBtn fr">
	                            	{cur:vid>0}
	                                <a id="delete" class="button white" href="{删除分卷}">删除</a>
	                            	{/cur}
                        			<a class="button save" id="save" data-type="update"><span class="icon"></span>保存</a>
	                            </div>
	                            <em class="c999">编辑分卷信息</em>
	                        </div>
						</div>
                        
				
				
						<div class="volumeForm">
		                    <ul>
		                        <li>
		                            <em>分卷名称</em>
		                            <input id="name" name="name" autocomplete="off" class="midInput" type="text" value="{分卷名字}" placeholder="分卷的名字。示例：“第一卷 横空出世”">
		                        </li>
		                        <li>
		                            <em>显示顺序</em>
		                            <input id="order" name="order" autocomplete="off" class="midInput" type="text" value="{分卷顺序}" placeholder="分卷的顺序。越小越靠前">
		                        </li>
		                        <li>
		                            <em>分卷介绍</em>
		                            <textarea id="desc" name="desc" autocomplete="off" placeholder="分卷的简介。">{分卷简介}</textarea>
		                        </li>
		                    </ul>
		                </div>
                
                    </div>
 				</form>
            </div>
        </div>
    </div>
 </div>
{header:author/inc_footer.html}
<script>
//保存分卷信息
$("#save").click(function(){
	var name = $("#name").val();
	var desc = $("#desc").val();
	
	if( name == '' ){
		easydialog_alert('对不起，分卷名字不能为空！','','','');
	}else if( name == '' ){
		easydialog_alert('对不起，显示顺序只能为数字！','','','');
	}else{
		$.ajax({
			type:"POST",
			url:"{url:action;author.novel_volumeedit&ajax=yes}",
			data:$("#form").serializeArray(),
			dataType:"json",
			success:function(data){
				easydialog_alert(data.msg,'','','');
			},
			async:true,
		});
	}
});
</script>