我'使用响应式文件管理器http://www.responsivefilemanager.com 我想要多个选择图像文件,但我不知道配置
这是我的代码html
<div class="form-group field-posts-post_images">
<label for="post_image" class="control-label">Post Images</label>
<input type="text" maxlength="255" name="Posts[post_images]" class="form-control" id="post_image" multiple="multiple">
</div>
<div class="modal fade" id="postImage" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document" style="width:80%">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Media manager</h4>
</div>
<div class="modal-body">
<iframe src="http://localhost/cms/filemanager/dialog.php?type=2&field_id=post_image" style="zoom:0.60" frameborder="0" height="500px" width="99.6%"></iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
答案 0 :(得分:-1)
参考this,他们会在下一个版本中添加该功能......
但是你可以用#34;旧方法&#34; .. 使用追加
<div class="form-group field-posts-post_images">
<label for="post_image" class="control-label">Post Images</label>
<input type="text" maxlength="255" name="post_images" class="form-control" id="post_image" multiple="multiple">
</div>
<div id="append-add-field"></div>
<div class="form-group">
<div class="text-left">
<a class="btn btn-sm btn-success btn-add-field" id="2">Add New Picture</a>
</div>
</div>
然后在mybe你可以使用ajax或简单的js来追加
$(document).on('click','.btn-add-field',function(e){
e.preventDefault();
var id = $(this).attr("id");
var newid = parseInt(id) + 1;
$.ajax({
type: "POST",
url: "some-url-that-return-html-tags",
data: dataString,
cache: false,
success: function(html){
$('#append-add-field').append(html);
$('.btn-add-field').attr("id", ""+newid+"");
}
});
return false;
});
或 ALTERNATIVE 只需循环播放您的网址
<iframe src="http://localhost/cms/filemanager/dialog.php?type=2&field_id=post_image" style="zoom:0.60" frameborder="0" height="500px" width="99.6%"></iframe>
到
<iframe src="http://localhost/cms/filemanager/dialog.php?type=2&field_id=post_image[YOUR-ID]" style="zoom:0.60" frameborder="0" height="500px" width="99.6%"></iframe>