##// END OF EJS Templates
import jQuery Datepicker i18n files version 1.11.1...
import jQuery Datepicker i18n files version 1.11.1 https://github.com/jquery/jquery-ui/commit/874945e66d6684e7ef7013e1bc2723b485ed6178 git-svn-id: http://svn.redmine.org/redmine/trunk@13416 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r11612:7e41730293c5
r13052:9a7fb0ad7be0
Show More
upload.js.erb
14 lines | 597 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 %>
$('<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');
<% end %>