From c5bb41db82b5608d01aa50be8ceff0a7906696b9 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Wed, 7 Oct 2009 11:36:43 -0400 Subject: [PATCH] Context delete working --- app/views/contexts/_context_listing.rhtml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/contexts/_context_listing.rhtml b/app/views/contexts/_context_listing.rhtml index 55351adf..5661f3b9 100644 --- a/app/views/contexts/_context_listing.rhtml +++ b/app/views/contexts/_context_listing.rhtml @@ -19,7 +19,15 @@ <% else %> VISIBLE <% end %> - <%= image_tag( "blank.png", :title => "Delete context", :class=>"delete_item") %> + <%= link_to_remote( + image_tag( "blank.png", :title => "Delete context", :class=>"delete_item"), + :url => {:controller => 'contexts', :action => 'destroy', :id => context.id}, + :method => 'delete', + :with => "'_source_view=#{@source_view}'", + :before => "$('#{dom_id(context)}').block({message:null});", + :complete => "$('#{dom_id(context)}').unblock();", + :confirm => "Are you sure you want to delete the context '#{context.name}'?" + ) %> <%= link_to_remote( image_tag( "blank.png", :title => "Edit context", :class=>"edit_item"), :url => {:controller => 'contexts', :action => 'edit', :id => context.id},