diff app/views/attachments/_form.html.erb @ 1516:b450a9d58aed redmine-2.4

Update to Redmine SVN revision 13356 on 2.4-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:28:31 +0100
parents 261b3d9a4903
children 2e8063097240
line wrap: on
line diff
--- a/app/views/attachments/_form.html.erb	Mon Mar 17 08:54:02 2014 +0000
+++ b/app/views/attachments/_form.html.erb	Tue Sep 09 09:28:31 2014 +0100
@@ -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' %>