mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-11 15:12:37 +01:00
migrate edit update and destroy to jQuery and refactor it
test for changing state is wip, forgot to mark it with @wip
This commit is contained in:
parent
ee4ef4ad42
commit
35453acd57
12 changed files with 198 additions and 105 deletions
|
|
@ -13,24 +13,15 @@ suppress_edit_button ||= false
|
|||
<%= link_to_project( project ) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<span class="grey"><%= t('states.' + project.current_state.to_s).upcase %></span>
|
||||
<a class="delete_project_button"
|
||||
href="<%= project_path(project, :format => 'js') %>"
|
||||
title="<%= t('projects.delete_project_title') %> '<%= project.name %>'"><%= image_tag( "blank.png",
|
||||
:title => t('projects.delete_project'),
|
||||
:class=>"delete_item") %></a>
|
||||
<span class="grey"><%= project.current_state.to_s.upcase %></span>
|
||||
|
||||
<a class="delete_project_button" id="delete_project_<%= project.id%> " href="<%= project_path(project, :format => 'js') %>"
|
||||
title="<%= t('projects.delete_project_title') %> '<%= project.name %>'">
|
||||
<%= image_tag( "blank.png", :title => t('projects.delete_project'), :class=>"delete_item") %>
|
||||
</a>
|
||||
|
||||
<% unless suppress_edit_button -%>
|
||||
<%= link_to_remote(
|
||||
image_tag( "blank.png", :title => t('projects.edit_project_title'), :class=>"edit_item"),
|
||||
:url => {:controller => 'projects', :action => 'edit', :id => project.id},
|
||||
:method => 'get',
|
||||
:with => "'_source_view=#{@source_view}'",
|
||||
:before => "$('#{dom_id(project)}').block({message:null});",
|
||||
:complete => "$('#{dom_id(project)}').unblock();enable_rich_interaction();",
|
||||
:html => {:id => "link_edit_#{dom_id(project)}"}
|
||||
) %>
|
||||
|
||||
<%= link_to_edit_project(project, image_tag( "blank.png", :title => t('projects.edit_project_title'), :class=>"edit_item")) %>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue