Add warning that deleting a context will also delete all actions within it. Fixes #1049. Thanks edgimar for reporting this.

Conflicts:

	app/views/contexts/_context_listing.rhtml
This commit is contained in:
Reinier Balt 2010-08-19 11:00:33 +02:00
parent 468ac1eb26
commit af16843410

View file

@ -21,7 +21,7 @@
<% end %>
<a class="delete_context_button" href="<%= formatted_context_path(context, :js) %>" title="delete the context '<%= context.name %>'"><%= image_tag( "blank.png", :title => "Delete context", :class=>"delete_item") %></a>
<%= apply_behavior "a.delete_context_button:click", { :prevent_default => true, :external => true} do |page, element|
page.confirming "'Are you sure that you want to ' + this.title + '?'" do
page.confirming "'Are you sure that you want to delete the context '#{context.name}'? Be aware that this will also delete all (repeating) actions in this context!'" do
element.up('.context').start_waiting
page << remote_to_href(:method => 'delete')
end
@ -38,4 +38,4 @@
</div>
</div>
<%= render :partial => 'contexts/context_form', :object => context %>
</div>
</div>