annotate .svn/pristine/4a/4a905b256f6edbbe772142f865f00ae63e6aa5e8.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents 261b3d9a4903
children
rev   line source
Chris@1464 1 <span id="attachments_fields">
Chris@1464 2 <% if defined?(container) && container && container.saved_attachments %>
Chris@1464 3 <% container.saved_attachments.each_with_index do |attachment, i| %>
Chris@1464 4 <span id="attachments_p<%= i %>">
Chris@1464 5 <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename') +
Chris@1464 6 text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description') +
Chris@1464 7 link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
Chris@1464 8 <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
Chris@1464 9 </span>
Chris@1464 10 <% end %>
Chris@1464 11 <% end %>
Chris@1464 12 </span>
Chris@1464 13 <span class="add_attachment">
Chris@1464 14 <%= file_field_tag 'attachments[dummy][file]',
Chris@1464 15 :id => nil,
Chris@1464 16 :class => 'file_selector',
Chris@1464 17 :multiple => true,
Chris@1464 18 :onchange => 'addInputFiles(this);',
Chris@1464 19 :data => {
Chris@1464 20 :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
Chris@1464 21 :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
Chris@1464 22 :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
Chris@1464 23 :upload_path => uploads_path(:format => 'js'),
Chris@1464 24 :description_placeholder => l(:label_optional_description)
Chris@1464 25 } %>
Chris@1464 26 (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
Chris@1464 27 </span>
Chris@1464 28
Chris@1464 29 <% content_for :header_tags do %>
Chris@1464 30 <%= javascript_include_tag 'attachments' %>
Chris@1464 31 <% end %>