##// END OF EJS Templates
Merged r15490 to r15493, r15496, r15497 (#22951)....
Merged r15490 to r15493, r15496, r15497 (#22951). git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15500 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r11612:7e41730293c5
r15118:8516e1c88dfe
Show More
upload.js.erb
14 lines | 597 B | text/plain | TextLexer
Jean-Philippe Lang
Merged ajax_upload branch (#3957)....
r10748 var fileSpan = $('#attachments_<%= j params[:attachment_id] %>');
Jean-Philippe Lang
Display error messages when attachment validation fails (#13949)....
r11612 <% if @attachment.new_record? %>
fileSpan.hide();
alert("<%= escape_javascript @attachment.errors.full_messages.join(', ') %>");
<% else %>
Jean-Philippe Lang
Merged ajax_upload branch (#3957)....
r10748 $('<input>', { type: 'hidden', name: 'attachments[<%= j params[:attachment_id] %>][token]' } ).val('<%= j @attachment.token %>').appendTo(fileSpan);
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');
Jean-Philippe Lang
Display error messages when attachment validation fails (#13949)....
r11612 <% end %>