summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-07-01 03:52:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-07-01 03:52:43 +0000
commit1b750f319245f56fbfaa541e271c6efbde4985b8 (patch)
treed0f8932b8b1fbe1cb883690ebc67851e4f4e93c2 /app
parentcb7b57815e3a3e2443a3f5775d39b884f9ccbd11 (diff)
downloadredmine-1b750f319245f56fbfaa541e271c6efbde4985b8.tar.gz
redmine-1b750f319245f56fbfaa541e271c6efbde4985b8.zip
fix file upload broken on Chrome 36 (#17151)
Contributed by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@13199 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/attachments/_form.html.erb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb
index 65ad8804a..26ff5c96a 100644
--- a/app/views/attachments/_form.html.erb
+++ b/app/views/attachments/_form.html.erb
@@ -15,7 +15,6 @@
:id => nil,
:class => 'file_selector',
:multiple => true,
- :onchange => 'addInputFiles(this);',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
@@ -25,6 +24,9 @@
} %>
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span>
+<%= javascript_tag do %>
+ $('input.file_selector').on('change', function(){addInputFiles(this);});
+<% end %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %>