<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ include file="../common/common.jsp"%>
<title>品牌植入方式</title>
</head>
<link rel="stylesheet" type="text/css" href="${staticPath}webupload/progress.css">
<body>
<div class="open-content open-pad">
    <form id="saveInfoFrm">
    <ul class="ulFrm mTop10">
        <c:if test="${modeType == 1}">
        <li>
            <span class="label labelW80 alignTop"><em>*</em>&nbsp;广告属性：</span>
            <div class="inline">
                <c:forEach items="${modeList}" var="item">
                    <c:if test="${item.type == 1}">
                        <input type="radio" name="mode" class="radio" value="${item.id}" <c:if test="${map.mode == item.id}">checked="checked"</c:if> /><label>${item.val}</label>
                    </c:if>
                </c:forEach>
            </div>
        </li>
        <li>
            <span class="label labelW80">广告语：</span>
            <input type="text" class="text {text:'请填写广告语'}" name="slogan" size="40" value="${map.slogan}">
        </li>
        </c:if>
        <c:if test="${modeType == 2}">
        <li>
            <span class="label labelW80 alignTop"><em>*</em>&nbsp;植入方式：</span>
            <div class="inline">
                <c:forEach items="${modeList}" var="item">
                    <c:if test="${item.type == 3}">
                        <input type="radio" name="mode" class="radio" value="${item.id}" <c:if test="${map.mode == item.id}">checked="checked"</c:if> /><label>${item.val}</label>
                    </c:if>
                </c:forEach>
            </div>
        </li>
        </c:if>
        <li>
            <span class="label labelW80"><em>*</em>&nbsp;植入截图：</span>
            <ul class="place-img clearfix2 inline" id="imgShow">
	            <c:if test="${!empty map.imgUrls}">
	                <c:set value="${ fn:split(map.imgUrls, ';') }" var="imgArr" />
	                <c:forEach items="${imgArr}" var="imgUrl">
	                    <li><a class="img" href="${imgUrl}" style="background-image: url(${imgUrl});" target="_blank"></a></li>
	                </c:forEach>
	            </c:if>
            </ul>
            <div id="picker" class="jia mLeft5"></div>
        </li>
        <%--<li>
            <span class="label labelW80"><em>*</em>&nbsp;植入视频：</span>
            <ul class="place-img clearfix2 inline" id="videoShow">
                <c:if test="${!empty map.videoUrls}">
                    <c:set value="${ fn:split(map.videoUrls, ';') }" var="videoArr" />
                    <c:forEach items="${videoArr}" var="videoUrl">
                        <li>
                            <video class="video" scr="${videoUrl}" controls="controls"></video>
                        </li>
                    </c:forEach>
                </c:if>
            </ul>
            <div id="videoPicker" class="jia mLeft5"></div>
        </li>--%>
        <li>
            <span class="label labelW80"><em>*</em>&nbsp;频次：</span>
            <input type="text" class="text {text:'请填写频次'}" name="frequency" size="40" value="${map.frequency}">&nbsp;次
        </li>
        <li>
            <span class="label labelW80"><em>*</em>&nbsp;时长：</span>
            <input type="text" class="text {text:'请填写时长'}" name="length" size="40" value="${map.length}">&nbsp;秒
        </li>
    </ul>
    </form>
</div>
<div class="open-fixed-buttons">
    <a href="javascript:saveInfoBox();" class="btn-radius">提交</a>
    <a href="javascript:top.$.closeWindow();" class="btn-radius cancel">取消</a>
</div>
<script type="text/javascript" src="${staticPath}webupload/webuploader.min.js"></script>
<script type="text/javascript" src="${staticPath}webupload/upload.js"></script>
<script type="text/javascript" src="${staticPath}js/advertise/brand_placement.js"></script>
<script type="text/javascript">
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    $.radio();
    setDefaultData();
    /*上传单张图片按钮初始化*/
    uploadImg('picker', '+', 3, true, false, null,"myCallbcak");
});
function myCallbcak(url){
	$("#imgShow").append('<li><a href="javascript:void(0);" class="del" onclick="delImg(this);"></a><a href="'+url+'" class="img" style="background-image: url('+url+');" target="_blank"></a></li>');
}
</script>
</body>
</html>
