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:
Reinier Balt 2010-10-07 23:24:50 +02:00
parent ee4ef4ad42
commit 35453acd57
12 changed files with 198 additions and 105 deletions

View file

@ -14,16 +14,7 @@
<% else -%>
'<%= project.default_tags -%>' as the default tags.
<% end -%>
<a class ="project_edit_settings" id="link_edit_<%=dom_id(project)-%>" href="<%=url_for(:controller => 'projects', :action => 'edit', :id => project.id)%>">Edit Project Settings</a>
<%#= link_to_remote(
"",
: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, "Edit Project Settings") %>
</div>
<% unless project.description.blank? -%>
<div class="project_description"><%= format_note(project.description) %></div>