mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-16 01:06:32 +01:00
get some wip cucumber tests running
This commit is contained in:
parent
1372bb110e
commit
c0115eacd7
11 changed files with 273 additions and 179 deletions
|
|
@ -31,8 +31,10 @@ function insert_new_context_with_new_todo() {
|
|||
|
||||
function add_todo_to_existing_context() {
|
||||
<% if source_view_is_one_of(:todo, :deferred, :tag) -%>
|
||||
$('#c<%= @todo.context_id %>').fadeIn(500, function() {});
|
||||
$('#no_todos_in_view').slideUp(100);
|
||||
<% unless source_view_is_one_of(:todo, :tag) && @todo.deferred? -%>
|
||||
$('#c<%= @todo.context_id %>').fadeIn(500, function() {});
|
||||
$('#no_todos_in_view').slideUp(100);
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
$('#<%=empty_container_msg_div_id%>').hide();
|
||||
$('#<%=item_container_id(@todo)%>').append(html_for_new_todo());
|
||||
|
|
|
|||
|
|
@ -31,18 +31,20 @@ function show_empty_messages() {
|
|||
}
|
||||
|
||||
function remove_todo_from_page() {
|
||||
<% if (@remaining_in_context == 0)
|
||||
<% if (@remaining_in_context == 0) && update_needs_to_hide_context
|
||||
# remove context with deleted todo
|
||||
-%>
|
||||
$('#c<%=@todo.context_id%>').fadeOut(1000, function() {
|
||||
$('#c<%=@todo.context_id%>').fadeOut(400, function() {
|
||||
$('#<%=dom_id(@todo)%>').remove();
|
||||
});
|
||||
<% else
|
||||
<%= show_empty_message_in_source_container -%>
|
||||
<% else
|
||||
# remove only the todo
|
||||
-%>
|
||||
$('#<%=dom_id(@todo)%>').slideUp(1000, function() {
|
||||
<%= show_empty_message_in_source_container %>
|
||||
$('#<%=dom_id(@todo)%>').slideUp(400, function() {
|
||||
$('#<%=dom_id(@todo)%>').remove();
|
||||
});
|
||||
});
|
||||
<% end -%>
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue