mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
fix file upload broken on Chrome 36 (#17151)
Contributed by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@13183 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8ee6495978
commit
5f99260cc2
@ -15,7 +15,6 @@
|
|||||||
:id => nil,
|
:id => nil,
|
||||||
:class => 'file_selector',
|
:class => 'file_selector',
|
||||||
:multiple => true,
|
:multiple => true,
|
||||||
:onchange => 'addInputFiles(this);',
|
|
||||||
:data => {
|
:data => {
|
||||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
: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)),
|
: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) %>)
|
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||||
</span>
|
</span>
|
||||||
|
<%= javascript_tag do %>
|
||||||
|
$('input.file_selector').on('change', function(){addInputFiles(this);});
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<%= javascript_include_tag 'attachments' %>
|
<%= javascript_include_tag 'attachments' %>
|
||||||
|
|||||||
@ -131,7 +131,7 @@ function addInputFiles(inputEl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clearedFileInput.insertAfter('#attachments_fields');
|
clearedFileInput.insertAfter('#attachments_fields').on('change', function(){addInputFiles(this);});
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadAndAttachFiles(files, inputEl) {
|
function uploadAndAttachFiles(files, inputEl) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user