mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-18 13:18:09 +01:00
parent
15a2eb6f08
commit
bc73b18bed
9 changed files with 364 additions and 311 deletions
|
|
@ -1,6 +1,11 @@
|
|||
<% if !@saved -%>
|
||||
<% if !@saved
|
||||
if @predecessor.completed? -%>
|
||||
TracksPages.page_notify('error', "<%= t('todos.cannot_add_dependency_to_completed_todo') %>", 8);
|
||||
$('#<%=dom_id(@todo)%>').html(html_for_todo());
|
||||
<% else -%>
|
||||
TracksPages.page_notify('error', "<%= t('todos.unable_to_add_dependency') %>", 8);
|
||||
<% else -%>
|
||||
<% end
|
||||
else -%>
|
||||
remove_successor_from_page();
|
||||
replace_updated_predecessor();
|
||||
regenerate_predecessor_family();
|
||||
|
|
@ -19,7 +24,7 @@ function replace_updated_predecessor() {
|
|||
|
||||
function show_in_tickler_box() {
|
||||
$("#tickler-empty-nd").hide();
|
||||
$('#tickler').append( html_for_deferred_todo() );
|
||||
$('#tickler').append( html_for_todo() );
|
||||
}
|
||||
|
||||
function regenerate_predecessor_family() {
|
||||
|
|
@ -37,9 +42,12 @@ function html_for_predecessor() {
|
|||
return "<%= escape_javascript(render(:partial => @predecessor, :locals => { :parent_container_type => parent_container_type })) %>";
|
||||
}
|
||||
|
||||
function html_for_deferred_todo() {
|
||||
<% end # if !@saved
|
||||
|
||||
# following js is needed in case of an error with dragging onto a completed action althoug
|
||||
%>
|
||||
|
||||
function html_for_todo() {
|
||||
return "<%= escape_javascript(render(:partial => @todo, :locals => { :parent_container_type => parent_container_type })) %>";
|
||||
}
|
||||
|
||||
<% end # if !@saved
|
||||
%>
|
||||
Loading…
Add table
Add a link
Reference in a new issue