<%@ 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">
<link rel="stylesheet" type="text/css" href="${staticPath}css/jquery.datetimepicker.css" />
<body>
<div class="open-content open-pad">
    <form id="dataForm" action="" method="post" enctype="multipart/form-data">
    <ul class="ulFrm">
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;电视台名称</span>
            <input type="text" name="platformName" class="text {text:'请填写电视台名称。若无，则填写无'}" size="40" value="${AdProgramSchedule.platformName}" />
        </li>
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;类型</span>
            <div class="select {height:100,width:120}">
                <select name="type" id="type">
                    <option value="">下拉选择</option>
                    <option value="1" <c:if test="${AdProgramSchedule.type == 1}"> selected="selected"</c:if> >剧编及备播</option>
                    <option value="2" <c:if test="${AdProgramSchedule.type == 2}"> selected="selected"</c:if> >剧排进程</option>
                    <option value="3" <c:if test="${AdProgramSchedule.type == 3}"> selected="selected"</c:if> >节目编排</option>
                </select>
            </div>
        </li>
        <li>
			<span class="label labelW80 labelRight"><em>*</em>更新时间</span>
			<input type="text" name="updDate" id="updDate" class="text {text:'更新时间'}" value="<fmt:formatDate value="${AdProgramSchedule.updDate}" type="date"/> " />
		</li>
		<li>
            <span class="label labelW80 labelRight alignTop"><em>*</em>&nbsp;编排图<br /></span>
            <div class="webuploader">
                <img id="imgUrl" src="${AdProgramSchedule.imgUrl}"<c:if test="${empty(AdProgramSchedule.imgUrl)}"> class="contentTxt"</c:if> />
                <div id="picker_imgUrl" class="jia"></div>
            </div>
        </li>
        <input type="hidden" id="associatedFile" value="${AdProgramSchedule.associatedFile }" />
        <input type="hidden" id="associatedFileName" value="${AdProgramSchedule.associatedFileName }" />
        <li>
            <span class="label labelW80 labelRight alignTop"><em>*</em>&nbsp;排序号<br /></span>
            <input type="text" name="sortNum" id="sortNum" class="text {text:'排序号'}"  value="${AdProgramSchedule.sortNum}" />
        </li>
    </ul>
    </form>
    <ul>
    <li>
        <span class="label labelW80 labelRight alignTop">&nbsp;关联文件<br /></span>
        <span class="btn upfile" id="uploadspan">
            <span class="webuploader-pick" id="fileName"><c:choose><c:when test="${!empty AdProgramSchedule.associatedFileName }">${AdProgramSchedule.associatedFileName}</c:when><c:otherwise>上传文件</c:otherwise></c:choose></span>
            <form id="uploadFile" action="upload_file_by_program_schedule.do" method="post">
                <input type="file" name="associatedFile" />
            </form>
        </span>
    </li></ul>
    <input type="hidden" id="crtTime" value="<fmt:formatDate value='${AdProgramSchedule.crtTime }' pattern='yyyy-MM-dd'/>" />
</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>
<iframe id="hframe" name="hframe" style="display: none;"></iframe>
<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/program_schedule.js"></script>
<script type="text/javascript" src="${staticPath}js/common/jquery.datetimepicker.js"></script>
<script type="text/javascript">
    var fromNum = 0;
$(function(){
    $.resetText();
    $.radio();
    $(".text").input();
    $(".select").uiSelect();
    $("#updDate").datetimepicker();
    $("#uploadFile").on("change",function(obj){
        if(obj.value != ''){
            $("#uploadFile").attr("enctype","multipart/form-data").attr("target","hframe").submit();
            $("#uploadFile").unbind("change");
            $("input[name='associatedFile']").hide();
        }
    });
    /*上传单张图片按钮初始化*/
    uploadImg('picker_imgUrl', '+', 2, true, false, null,"myCallbcak");
    //$("#platform").inputTips("ajax_platform_name_list.do",2,"#returnId",240,null,true);
});
function myCallbcak(url){
    $("#imgUrl").show();
    $("#imgUrl").attr("src",url);
}

</script>
</body>
</html>