解决谷歌浏览器再上传相同文件时不可用

This commit is contained in:
linhk 2014-08-07 09:13:01 +08:00
parent f173db4c9d
commit 0c00754057
2 changed files with 10 additions and 2 deletions

View File

@ -12,8 +12,16 @@
<% end %>
<% end %>
</span>
<script type='text/javascript'>
function CompatibleSend()
{
var obj=document.getElementById("_file");
var file= $(obj).clone();
file.click();
}
</script>
<span class="add_attachment">
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %>
<%= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',

View File

@ -1,5 +1,5 @@
<div class="frame-wiki">
<div class="contextual">
<% if User.current.allowed_to?(:edit_documents, @project) %>
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>