<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ 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="dataForm" method="post">
    <ul class="ulFrm">
    	<li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;资源类型</span>
            <div class="select {height:100,width:120,onchange:resetInput}">
                <select name="resourceType" id="resourceType">
                    <option value="">下拉选择</option>
                    <option value="1" <c:if test="${AdRescourceRecom.resourceType == 1}"> selected="selected"</c:if> >电视节目</option>
                    <option value="2" <c:if test="${AdRescourceRecom.resourceType == 2}"> selected="selected"</c:if> >电视硬广</option>
                    <option value="3" <c:if test="${AdRescourceRecom.resourceType == 3}"> selected="selected"</c:if> >网络长视频</option>
                    <option value="4" <c:if test="${AdRescourceRecom.resourceType == 4}"> selected="selected"</c:if> >网络短视频</option>
                    <option value="5" <c:if test="${AdRescourceRecom.resourceType == 5}"> selected="selected"</c:if> >APP</option>
                </select>
            </div>
        </li>
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;资源名称</span>
            <input type="text" id="resourceName" arrow=true class="text" placeholder="请输入资源名称。" size="33" name="resourceName" value="${AdRescourceRecom.resourceName}" />
        </li>
        <li>
	       <span class="label labelW80 labelRight"><em>*</em>&nbsp;播出频道</span>
	       <input type="text" id="platform" arrow=true class="text" placeholder="请输入播出频道。" size="33" name="platform" value="${AdRescourceRecom.platform}" />
        </li>
        <li>
            <span class="label labelW80 labelRight alignTop"><em>*</em>&nbsp;推荐图<br /></span>
            <div class="webuploader">
                <img id="imgUrl" src="${AdRescourceRecom.imgUrl}"<c:if test="${empty(AdRescourceRecom.imgUrl)}"> class="contentTxt"</c:if> />
                <div id="picker_imgUrl" class="jia"></div>
            </div>
        </li>
        <li>
			<span class="label labelW80 labelRight"><em>*</em>推荐类型</span>
			<input type="radio" class="radio"  name="recomType" value="1"  ${AdRescourceRecom.recomType == null ? "" : AdRescourceRecom.recomType == 1 ? "checked" : ""}/><label>头部轮播区</label>
			<input type="radio" class="radio" name="recomType" value="2" ${AdRescourceRecom.recomType == 2 ? "checked" : ""}/><label>非头部</label>
		</li>
		<li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;推荐顺序</span>
            <input type="text" name="rank" class="text {text:'请填写推荐顺序'}" size="40" value="${AdRescourceRecom.rank}" />
        </li>
    </ul>
    </form>
</div>
<div class="open-fixed-buttons">
    <a href="javascript:save();" 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/resource_recom.js"></script>
<script type="text/javascript">
$(function(){
    $.resetText();
    $.radio();
    $(".text").input();
    $(".select").uiSelect();
    /*上传单张图片按钮初始化*/
    uploadImg('picker_imgUrl', '+', 2, true, false, null,"myCallbcak");
    $("#platform").inputTips("ajax_platform_name_list.do",2,"",240,null,true);
    resetInput();
});
function resetInput(){
	$("#resourceName").inputTips("ajax_query_resource_library_by_name.do",2,"",240,null,true,{"resourceType":$("#resourceType>option:selected").val()});
}

function myCallbcak(url){
    $("#imgUrl").show();
    $("#imgUrl").attr("src",url);
}
</script>
</body>
</html>