]> source.dussan.org Git - redmine.git/commitdiff
revert r13183 (#17151)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 Jun 2014 17:09:15 +0000 (17:09 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 Jun 2014 17:09:15 +0000 (17:09 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13186 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/attachments/_form.html.erb
public/javascripts/attachments.js

index 26ff5c96a7a5ee3c456bad5b862a09262da9aedf..65ad8804a4ccae7badd6ac28281e1f5d589412ab 100644 (file)
@@ -15,6 +15,7 @@
       :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)),
@@ -24,9 +25,6 @@
       } %>
 (<%= 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' %>
index 43803ba9c9e62428779c812b4b2818b6f84853ef..a689c2ef3e343f02feed514228a65aa97019db5c 100644 (file)
@@ -131,7 +131,7 @@ function addInputFiles(inputEl) {
     }
   }
 
-  clearedFileInput.insertAfter('#attachments_fields').on('change', function(){addInputFiles(this);});
+  clearedFileInput.insertAfter('#attachments_fields');
 }
 
 function uploadAndAttachFiles(files, inputEl) {