enable autocomplete for project settings

This commit is contained in:
Reinier Balt 2011-03-09 11:58:29 +01:00
parent 068c4bf60e
commit 8e0b1e4c2d
5 changed files with 150 additions and 126 deletions

View file

@ -4,7 +4,7 @@
<a href="#" class="container_toggle" id="toggle_p<%= project.id %>"><%= image_tag("collapse.png") %></a>
<% end -%>
<%= project.name -%></h2>
<div id="<%= dom_id(project, "container")%>">
<div id="<%= dom_id(project, "container")%>" class="list"><%-# list needs to be here for edit form to work -%>
<%= render :partial => "projects/project_settings", :object => project, :locals => { :collapsible => collapsible } %>
</div>
</div>

View file

@ -22,4 +22,5 @@
<% end -%>
</div>
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;">
<div class="placeholder"> </div>
</div>

View file

@ -4,6 +4,7 @@ function replace_project_with_edit_form() {
$('div#<%=dom_id(@project)%>').fadeOut(250, function() {
show_edit_form();
set_focus();
enable_rich_interaction();
});
}

View file

@ -40,7 +40,10 @@ function update_project_page() {
}
function remove_project_edit_form() {
$('#<%=dom_id(@project, 'edit')%>').hide(500, function() {$('#<%=dom_id(@project, 'edit')%>').remove();} );
<%-
# do not remove() edit form as this will remove the DIV that is needed to replace with the new form, so only empty the DIV
-%>
$('#<%=dom_id(@project, 'edit')%>').hide(500, function() {$('#<%=dom_id(@project, 'edit')%>').html("<!- empty ->");} );
}
function update_and_show_project_settings() {