zjq:modify mutipy picture
This commit is contained in:
parent
775a8b2f6f
commit
e934a901ee
|
@ -38,9 +38,10 @@
|
|||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<div id="image-upload">
|
||||
<div id="total">当前选择上传0个图片</div><input class="btn btn-default" type="button" value="添加图片" id="btnAdd" onclick="selectAttachment();">
|
||||
<input type="button" value="清空图片" id="btnClear" style="display:none" onclick="clearAttachment();">
|
||||
<div id="attachmentList"></div>
|
||||
<div id="total">当前选择上传0个图片</div>
|
||||
<input class="btn btn-default" type="button" value="添加图片" id="btnAdd" onclick="selectAttachment();">
|
||||
<input class="btn btn-default" type="button" value="清空图片" id="btnClear" style="display:none" onclick="clearAttachment();">
|
||||
<div id="attachmentList" style="display: none"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -87,14 +88,14 @@
|
|||
var i = 0; // 用来动态生成span,upfile的id
|
||||
function addAttachmentToList() {
|
||||
if (findAttachment(event.srcElement.value)) return; //如果此文档已在图片列表中则不再添加
|
||||
|
||||
// 动态创建图片信息栏并添加到图片列表中
|
||||
var span = document.createElement('span');
|
||||
span.id = '_attachment' + i;
|
||||
span.innerHTML = extractFileName(event.srcElement.value) + ' <a href="javascript:delAttachment(' + (i++) + ')"><font color="blue">删除</font></a><br/>';
|
||||
span.title = event.srcElement.value;
|
||||
G('attachmentList').appendChild(span);
|
||||
|
||||
if(extractFileName(event.srcElement.value)) {
|
||||
// 动态创建图片信息栏并添加到图片列表中
|
||||
var span = document.createElement('span');
|
||||
span.id = '_attachment' + i;
|
||||
span.innerHTML = extractFileName(event.srcElement.value) + ' <a href="javascript:delAttachment(' + (i++) + ')">删除</a><br/>';
|
||||
span.title = event.srcElement.value;
|
||||
G('attachmentList').appendChild(span);
|
||||
}
|
||||
// 显示图片列表并变换添加图片按钮文本
|
||||
if (G('attachmentList').style.display == 'none') {
|
||||
G('btnAdd').value = '继续添加';
|
||||
|
|
1668
log/development.log
1668
log/development.log
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue