Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
14
app/views/attachments/upload.js.erb
Normal file
14
app/views/attachments/upload.js.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
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 %>
|
Loading…
Add table
Add a link
Reference in a new issue