mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
fix #1137 for 1.7 branch. the delete warning for contexts always referenced the last context
This commit is contained in:
parent
e1d1c6edec
commit
e544e7d59f
1 changed files with 4 additions and 3 deletions
|
@ -19,12 +19,13 @@
|
|||
<% else %>
|
||||
<span class="grey">VISIBLE</span>
|
||||
<% 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>
|
||||
<a class="delete_context_button" href="<%= formatted_context_path(context, :js) %>" title="delete the context '<%= escape_javascript(h(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 delete the context \"#{escape_javascript(h(context.name))}\"? Be aware that this will also delete all (repeating) actions in this context!" do
|
||||
page << "if (confirm('Are you sure that you want to ' + this.title + '" +
|
||||
"? Be aware that this will also delete all (repeating) actions in this context!')) { "
|
||||
element.up('.context').start_waiting
|
||||
page << remote_to_href(:method => 'delete')
|
||||
end
|
||||
page << "} return false;"
|
||||
end -%>
|
||||
<a class="edit_context_button" href="#"><%= image_tag( "blank.png", :title => "Edit context", :class=>"edit_item") %></a>
|
||||
<%= apply_behavior 'a.edit_context_button:click', :prevent_default => true do |page, element|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue