2015-12-05 20 views
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> 

回答

-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 u可以使用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; 
}); 

OR为备选只是循环您的网址

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