mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-19 07:26:10 +01:00
17 lines
No EOL
490 B
Text
17 lines
No EOL
490 B
Text
hide_todo();
|
|
replace_placeholder_with_form();
|
|
enable_rich_interaction();
|
|
|
|
function hide_todo() {
|
|
$('#<%= dom_id(@todo, 'line') %>').hide();
|
|
}
|
|
|
|
function replace_placeholder_with_form() {
|
|
$('#<%=dom_id(@todo, 'edit')%>').html(html_for_edit_form());
|
|
$('#<%=dom_id(@todo, 'edit')%>').show();
|
|
$('#<%=dom_id(@todo, 'form')%> input#todo_description').focus();
|
|
}
|
|
|
|
function html_for_edit_form() {
|
|
return "<%= escape_javascript(render(:partial => 'todos/edit_form', :object => @todo)) %>"
|
|
} |