<%@ 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>
            <input type="text" name="model" class="text {text:'请填写产品型号。若无，则填写无'}" size="40" value="${map.model}" />
        </li>
        <li>
            <span class="label labelW80 labelRight alignTop"><em>*</em>&nbsp;产品<br />LOGO</span>
            <div class="webuploader">
                <img id="modelImgUrl" src="${map.modelImgUrl}"<c:if test="${empty(map.modelImgUrl)}"> class="contentTxt"</c:if> />
                <div id="picker_modelImgUrl" class="jia"></div>
            </div>
        </li>
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;所属品牌</span>
            <input type="text" name="brand" class="text {text:'请填写品牌'}" size="40" value="${map.brand}" />
        </li>
        <li>
            <span class="label labelW80 labelRight alignTop"><em>*</em>&nbsp;品牌<br />LOGO</span>
            <div class="webuploader">
                <img id="brandImgUrl" src="${map.brandImgUrl}"<c:if test="${empty(map.brandImgUrl)}"> class="contentTxt"</c:if> />
                <div id="picker_brandImgUrl" class="jia"></div>
            </div>
        </li>
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;广告主</span>
            <input type="text" name="advertiser" class="text {text:'请填写广告主'}" size="40" value="${map.advertiser}" />
        </li>
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;一级行业</span>
            <div class="select {height:100,width:120,onchange:onchangeByFirstInd}">
                <select name="firstInd" id="firstInd">
                    <option value="">下拉选择</option>
                    <c:forEach items="${brandType1}" var="item">
                        <option value="${item.number}" <c:if test="${map.firstInd == item.name}"> selected="selected"</c:if> >${item.name}</option>
                    </c:forEach>
                </select>
            </div>
        </li>
        <li>
            <span class="label labelW80 labelRight"><em>*</em>&nbsp;二级行业</span>
            <div class="select {height:100}">
                <select name="secondInd" id="secondInd">
                    <option value="">下拉选择</option>
                </select>
            </div>
        </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/brand.js"></script>
<script type="text/javascript">
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    onchangeByFirstInd('${map.secondInd}');
    /*上传单张图片按钮初始化*/
    uploadImg('picker_modelImgUrl', '+', 2, true, false, null,"myCallbcak");
    uploadImg('picker_brandImgUrl', '+', 2, true, false, null,"myCallbcak2");
});
function myCallbcak(url){
    $("#modelImgUrl").show();
    $("#modelImgUrl").attr("src",url);
}
function myCallbcak2(url){
    $("#brandImgUrl").show();
    $("#brandImgUrl").attr("src",url);
}
</script>
</body>
</html>