diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index 0a9f5e3eb..3e5904ae8 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -8,7 +8,7 @@ <% for attachment in attachments %> - +
<%= link_to_attachment attachment, class: 'icon icon-attachment' -%> (<%= number_to_human_size attachment.filesize %>) @@ -23,7 +23,7 @@ <% if options[:deletable] %> <%= link_to l(:button_delete), attachment_path(attachment), - :data => {:confirm => l(:text_are_you_sure)}, + :data => {:confirm => l(:text_are_you_sure), :remote => true}, :method => :delete, :class => 'delete icon-only icon-del', :title => l(:button_delete) %> @@ -37,7 +37,7 @@ <% if images.any? %>
<% images.each do |attachment| %> -
<%= thumbnail_tag(attachment) %>
+
<%= thumbnail_tag(attachment) %>
<% end %>
<% end %> diff --git a/app/views/attachments/destroy.js.erb b/app/views/attachments/destroy.js.erb index 29b9a0c76..0963ba0ee 100644 --- a/app/views/attachments/destroy.js.erb +++ b/app/views/attachments/destroy.js.erb @@ -1,2 +1,3 @@ $('#attachments_<%= j params[:attachment_id] %>').closest('.attachments_form').find('.add_attachment').show(); -$('#attachments_<%= j params[:attachment_id] %>').remove(); +$('#attachments_<%= j params[:attachment_id] %>, tr#attachment_<%= j params[:id] %>, div#thumbnail_<%= j params[:id] %>').remove(); +$('#attachments_count').html('<%= @attachment.container.try(:attachments).try(:length) %>'); diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 8dd106818..970d2fd73 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -46,7 +46,7 @@ <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>