<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<title>产品图片</title>
<%@include file="/common/taglibs.jspf"%>
<style type="text/css">
.prod_pic_box {
	width: 150px;
	height: 120px;
	float: left;
	text-align: center;
}

.prod_pic_box img {
	max-width: 140px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<section class="panel panel-default">
		<input type="hidden" id="prodId" value="${prodId}">
		<div class="panel-body" id="piclist" style="min-height: 250px;"></div>
		<footer class="panel-footer text-right bg-light lter">
			<input type="hidden" id="picId"> <input type="text"
				id="_path" class="form-control input-medium" placeholder="图片路径">
			<button class="btn btn-primary btn-s-xs" id="saveBtn">保存</button>
		</footer>
	</section>

	<script src="${ctx}/static/plugins/artTemplate/js/template.js"></script>
	<script src="${ctx}/static/resource/ebus/productImage.js"></script>
	<script type="text/html" id="addPicHtml">
	<div class="prod_pic_box" id="pic_{{picId}}">
			<img src="{{fpath}}"><br/>
			<button  class="btn btn-primary"  onclick="chooseImg({{picId}},'{{fpath}}")'>编辑</button>
			<button  class="btn btn-danger" onclick="removeBind({{picId}})">移除</button>
		</div>
	</script>
	<script type="text/html" id="picHtml">
	{{each content as pic}}
		<div class="prod_pic_box" id="pic_{{pic.picId}}">
			<img src="{{pic.fpath}}"><br/><br/>
			<button  class="btn btn-primary" onclick="chooseImg({{pic.picId}},'{{pic.fpath}}")'>编辑</button>
			<button class="btn btn-danger" onclick="removeBind({{pic.picId}})">移除</button>
		</div>
	{{/each}}
	</script>
</body>
</html>