##// END OF EJS Templates
acts_as_versioned use old style (Rails 2.x) of method call for #all (#24348)....
acts_as_versioned use old style (Rails 2.x) of method call for #all (#24348). git-svn-id: http://svn.redmine.org/redmine/trunk@15950 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r15535:ef45304817e9
r15568:2b70d977052a
Show More
upload.js.erb
14 lines | 512 B | text/plain | TextLexer
var fileSpan = $('#attachments_<%= j params[:attachment_id] %>');
<% if @attachment.new_record? %>
fileSpan.hide();
alert("<%= escape_javascript @attachment.errors.full_messages.join(', ') %>");
<% else %>
fileSpan.find('input.token').val('<%= j @attachment.token %>');
fileSpan.find('a.remove-upload')
.attr({
"data-remote": true,
"data-method": 'delete',
href: '<%= j attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>'
})
.off('click');
<% end %>