0

我使用响应式文件管理器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">&times;</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>
4

1 回答 1

-1

参考这个,他们将在下一个版本中添加该功能......

但你可以用“旧方式”来做......使用追加

<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;
});

或者对于替代只是循环你的网址

<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>
于 2016-04-30T05:11:44.520 回答