<%--
  Created by IntelliJ IDEA.
  User: 01112291
  Date: 16-3-8
  Time: 上午10:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/jsp/includes.jsp" %>
<input type="hidden" id="currentMenu" value="unit"/>
<div class="main main-cai">
<div class="inner-fmain">
<div class="drag-view chapter-sortable">
   <!--章信息-->
   <c:forEach items="${unitList}" var="unit">
       <div class="view-chapter viewChapter" unitId="${unit.unit.unitId}" displayOrder="">
           <div class="chapter-title">
               <div class="chapter-title-content">
                   <span class="chapter-text substr">${unit.unit.unitNo}  ${unit.unit.unitName}</span>
                   <div class="link-group" unitId="${unit.unit.unitId}">
                       <i class="icon-edit" title="编辑"></i>
                       <i class="icon-del" title="删除"></i>
                       <i class="icon-drag chapter_drag" title="拖拽排序"></i>
                   </div>
               </div>
               <!--章编辑-->
               <div class="form-action">
                   <div class="input-group">
                       <label class="input-label"><b>*</b>章序号</label>
                       <input class="input-text input-chapter unitNo" type="text" value="${unit.unit.unitNo}"/>
                   </div>
                   <div class="input-group">
                       <label class="input-label"><b>*</b>章名称</label>
                       <input class="input-text input-chapter unitName" type="text" value="${unit.unit.unitName}"/>
                   </div>
                   <div class="btn-area">
                       <a class="btn-public btn-min btn-modify" unitId="${unit.unit.unitId}" href="javascript:void(0)">更新</a>
                       <a class="btn-cancel cancel-unit-edit" href="javascript:void(0)">取消</a>
                   </div>
               </div>
           </div>
           <div class="lecture-sortable">
           <c:forEach items="${unit.itemList}" var="item">
                   <div class="view-lecture" itemId ="${item.item.itemId}" displayOrder="" unitId="${item.item.unitId}">
                       <div class="lecture-body" style="display:block;">
                           <div class="cai-sortable">
                               <div class="cai-item">
                                   <i class="icon-cai c-play"></i>
                                   <span class="cai-text video-text substr">${item.item.itemName}</span>
                                   <div class="link-group link-vgroup" itemId="${item.item.itemId}">
                                       <a href="javascript:void(0);" class="link-action renameItem" itemId="${item.item.itemId}">重命名</a>
                                       <i class="icon-edit01 editItem" title="编辑"></i>
                                       <i class="icon-del01 deleteItem" title="删除"></i>
                                       <i class="icon-drag01 lecture_drag" title="拖拽排序"></i>
                                   </div>
                               </div>
                           </div>
                       </div>
                   </div>
           </c:forEach>
           </div>
           <div class="cai-item-last">
               <span class="cai-option add-item" unitId="${unit.unit.unitId}"><i class="icon-add02"></i>视频</span>
           </div>
       </div>
   </c:forEach>
</div>

<div class="view-chapter viewChapter">
    <div class="chapter-title">
        <a href="javascript:void(0)" class="btn-new" id="add-unit"><i class="icon-new"></i>添加章</a>
        <div class="form-action">
            <div class="input-group">
                <label class="input-label"><b>*</b>章序号</label>
                <input class="input-text input-chapter" id="unitNo" type="text"/>
            </div>
            <div class="input-group">
                <label class="input-label"><b>*</b>章名称</label>
                <input class="input-text input-chapter" id="unitName" type="text"/>
            </div>
            <div class="btn-area">
                <a class="btn-public btn-min" id="save-unit" href="javascript:void(0)">添加</a>
                <a class="btn-cancel cancel-unit-add" href="javascript:void(0)">取消</a>
            </div>
        </div>
    </div>
</div>
</div>
</div>

<div class="dialog ui-dialog-public ui-dialog-form" id="updateItemDialog">
    <div class="dialog-form-list" style="line-height:50px;">
        <div class="input-group">
            <label class="input-label"><b>*</b>名称：</label>
            <input class="input-text input-chapter" id="itemName" type="text" />
        </div>
        <div class="input-group">
            <label id="oldItemName" style="margin-left: 30px;"></label>
        </div>
    </div>
    <div class="btn-area" style="text-align:center;">
        <a href="javascript:void(0);" class="btn-public" id="updateItem" itemId="">确定</a>
        <a href="javascript:void(0);" class="link-action cancelDialog">取消</a>
    </div>
</div>
<coeus:js src="/js/app/platform/unit.item.js?<%--[#ReleaseNo#]--%>" />

