【问题标题】:How to set multi select file in Responsive filemanager如何在响应式文件管理器中设置多选文件
【发布时间】:2015-12-05 03:58:41
【问题描述】:

我使用响应式文件管理器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>

【问题讨论】:

    标签: file-manager responsive-images responsive-filemanager


    【解决方案1】:

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

    但你可以用“旧方法”来做...... 使用附加

    <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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-24
      • 1970-01-01
      • 2018-10-13
      • 1970-01-01
      • 1970-01-01
      • 2020-08-19
      • 2018-10-07
      • 2017-11-12
      相关资源
      最近更新 更多