mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-08 08:34:21 +01:00
enable autocomplete for project settings
This commit is contained in:
parent
068c4bf60e
commit
8e0b1e4c2d
5 changed files with 150 additions and 126 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@
|
|||
<% end -%>
|
||||
</div>
|
||||
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;">
|
||||
<div class="placeholder"> </div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue