mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-08 16:44:20 +01:00
parent
2a6b8f1cd9
commit
b2e82ea6b6
9 changed files with 38 additions and 3 deletions
|
|
@ -6,7 +6,9 @@
|
|||
<a href="#" class="container_toggle" id="toggle_p<%= project.id %>"><%= image_tag("collapse.png") %></a>
|
||||
<% end %>
|
||||
<span class="in_place_editor_field" id="project_name_in_place_editor"><%= project.name %></span>
|
||||
<%= in_place_editor 'project_name_in_place_editor', { :url => { :controller => 'projects', :action => 'update', :id => project.id, :field => 'name', :wants_render => false, :escape => false} , :options=>"{method:'put'}" } %>
|
||||
<%= in_place_editor 'project_name_in_place_editor', {
|
||||
:url => { :controller => 'projects', :action => 'update', :id => project.id, :field => 'name', :update_project_name => true, :escape => false} ,
|
||||
:options=>"{method:'put'}", :script => true} %>
|
||||
</h2>
|
||||
<% unless project.description.blank? -%>
|
||||
<div class="project_description"><%= sanitize(project.description) %></div>
|
||||
|
|
|
|||
10
app/views/projects/update_project_name.js.rjs
Normal file
10
app/views/projects/update_project_name.js.rjs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
page['project_name_in_place_editor'].replace_html @project.name
|
||||
|
||||
page['default_project_name_id'].value = @project.name
|
||||
page['todo_project_name'].value = @project.name
|
||||
|
||||
# renew project auto complete array
|
||||
page << "projectAutoCompleter.options.array = #{project_names_for_autocomplete}; projectAutoCompleter.changed = true"
|
||||
|
||||
status_message = "Name of project was changed"
|
||||
page.notify :notice, status_message, 5.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue