mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-21 22:54:09 +01:00
migrate update for context, project, tickler and calendar
This commit is contained in:
parent
33f68df154
commit
c64e1bcd80
16 changed files with 494 additions and 402 deletions
|
|
@ -1,5 +1,17 @@
|
|||
page[dom_id(@todo, 'form')].find('.placeholder').show().replace_html :partial => 'todos/edit_form'
|
||||
page[dom_id(@todo, 'edit')].show
|
||||
page[dom_id(@todo, 'line')].hide
|
||||
page[dom_id(@todo, 'form')].find('input#todo_description').show().focus
|
||||
page << "enable_rich_interaction();"
|
||||
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)) %>"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue