mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-11 07:02:36 +01:00
Merge branch 'master' of git://github.com/bsag/tracks into bsag
This commit is contained in:
commit
8109d9ec7d
257 changed files with 24751 additions and 2042 deletions
|
|
@ -26,7 +26,8 @@
|
|||
:with => "'_source_view=#{@source_view}'",
|
||||
:before => "$('#{dom_id(context)}').block({message:null});",
|
||||
:complete => "$('#{dom_id(context)}').unblock();",
|
||||
:confirm => "Are you sure that you want to delete the context '#{context.name}'?"
|
||||
:confirm => "Are you sure that you want to delete the context '#{context.name}'?",
|
||||
:html => { :id => dom_id(context, 'delete') }
|
||||
) %>
|
||||
<%= link_to_remote(
|
||||
image_tag( "blank.png", :title => "Edit context", :class=>"edit_item"),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<%
|
||||
context = text_context
|
||||
todos_in_context = todos.select { |t| t.context_id == context.id }
|
||||
todos_in_context = not_done_todos.select { |t| t.context_id == context.id }
|
||||
if todos_in_context.length > 0
|
||||
-%> <%= context.name.upcase %>:
|
||||
<%= render :partial => "todos/text_todo", :collection => todos_in_context -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
page['context_name_in_place_editor'].replace_html @context.name
|
||||
|
||||
page['default_context_name_id'].value = @context.name
|
||||
page['todo_context_name'].value = @context.name
|
||||
|
||||
|
|
|
|||
|
|
@ -73,12 +73,6 @@
|
|||
<%= options_from_collection_for_select(@active_contexts, "id", "name", @active_contexts.first.id) unless @active_projects.empty?-%>
|
||||
<%= options_from_collection_for_select(@hidden_contexts, "id", "name") -%>
|
||||
</select>
|
||||
<%= observe_field "feed-contexts", :update => "feeds-for-context",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "feedlist", :action => "get_feeds_for_context" },
|
||||
:before => "$('feeds-for-context').startWaiting()",
|
||||
:complete => "$('feeds-for-context').stopWaiting()"
|
||||
-%>
|
||||
</li>
|
||||
<li>Step 2 - Select the feed for this context
|
||||
<div id="feedicons-context">
|
||||
|
|
@ -101,12 +95,6 @@
|
|||
<%= options_from_collection_for_select(@hidden_projects, "id", "name") -%>
|
||||
<%= options_from_collection_for_select(@completed_projects, "id", "name") -%>
|
||||
</select>
|
||||
<%= observe_field "feed-projects", :update => "feeds-for-project",
|
||||
:with => 'project_id',
|
||||
:url => { :controller => "feedlist", :action => "get_feeds_for_project" },
|
||||
:before => "$('feeds-for-project').startWaiting()",
|
||||
:complete => "$('feeds-for-project').stopWaiting()"
|
||||
-%>
|
||||
</li>
|
||||
<li>Step 2 - Select the feed for this project
|
||||
<div id="feedicons-project">
|
||||
|
|
|
|||
|
|
@ -27,12 +27,6 @@
|
|||
<% if has_contexts -%>
|
||||
<ol>
|
||||
<li>Choose the context you want to add actions to: <select name="applescript1-contexts" id="applescript1-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
|
||||
<%= observe_field "applescript1-contexts", :update => "applescript1",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "integrations", :action => "get_applescript1" },
|
||||
:before => "$('applescript1').startWaiting()",
|
||||
:complete => "$('applescript1').stopWaiting()"
|
||||
%>
|
||||
</li>
|
||||
<li>Copy the Applescript below to the clipboard.<br />
|
||||
|
||||
|
|
@ -52,12 +46,6 @@
|
|||
<% if has_contexts -%>
|
||||
<ol>
|
||||
<li>Choose the context you want to add actions to: <select name="applescript2-contexts" id="applescript2-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
|
||||
<%= observe_field "applescript2-contexts", :update => "applescript2",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "integrations", :action => "get_applescript2" },
|
||||
:before => "$('applescript2').startWaiting()",
|
||||
:complete => "$('applescript2').stopWaiting()"
|
||||
%>
|
||||
</li>
|
||||
<li>Copy the Applescript below to the clipboard.<br />
|
||||
|
||||
|
|
@ -79,12 +67,6 @@
|
|||
<% if has_contexts -%>
|
||||
<ol>
|
||||
<li>Choose the context you want to add actions to: <select name="quicksilver-contexts" id="quicksilver-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
|
||||
<%= observe_field "quicksilver-contexts", :update => "quicksilver",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "integrations", :action => "get_quicksilver_applescript" },
|
||||
:before => "$('quicksilver').startWaiting()",
|
||||
:complete => "$('quicksilver').stopWaiting()"
|
||||
%>
|
||||
</li>
|
||||
<li>Copy the Applescript below to the clipboard.<br />
|
||||
|
||||
|
|
|
|||
|
|
@ -2,37 +2,27 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<% if @prefs.refresh != 0 -%>
|
||||
<meta http-equiv="Refresh" content="<%= @prefs["refresh"].to_i*60 %>;url=<%= request.request_uri %>">
|
||||
<% end -%>
|
||||
<% bundle :name => "tracks_css" do %>
|
||||
<%= stylesheet_link_tag *%w[ standard superfish niftyCorners jquery-ui jquery.autocomplete] %>
|
||||
<% end %>
|
||||
<%= stylesheet_link_tag 'standard','superfish','niftyCorners','jquery-ui',
|
||||
'jquery.autocomplete', :cache => true %>
|
||||
<%= stylesheet_link_tag "print", :media => "print" %>
|
||||
<% bundle :name => "jquery" do %>
|
||||
<%= javascript_include_tag 'jquery' %>
|
||||
<%= javascript_include_tag 'jquery-ui' %>
|
||||
<%= javascript_include_tag 'jquery.cookie' %>
|
||||
<%= javascript_include_tag 'jquery.blockUI' %>
|
||||
<%= javascript_include_tag 'jquery.jeditable' %>
|
||||
<%= javascript_include_tag 'jquery.autocomplete' %>
|
||||
<% end %>
|
||||
<% bundle :name => "tracks_js" do %>
|
||||
<%= javascript_include_tag *%w[
|
||||
hoverIntent superfish application
|
||||
accesskey-hints niftycube flashobject ] %>
|
||||
<% end %>
|
||||
<%= javascript_include_tag 'jquery','jquery-ui','jquery.cookie',
|
||||
'jquery.blockUI','jquery.jeditable','jquery.autocomplete', :cache => 'jquery-all' %>
|
||||
<%= javascript_include_tag 'hoverIntent','superfish','application',
|
||||
'accesskey-hints','niftycube','flashobject', :cache => 'tracks' %>
|
||||
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
|
||||
<%= javascript_tag "var SOURCE_VIEW = '#{@source_view}';" %>
|
||||
<%= javascript_tag "var TAG_NAME = '#{@tag_name}';" if @tag_name %>
|
||||
<script type="text/javascript">
|
||||
<% if defined? context_names_for_autocomplete -%>
|
||||
var contextNames = <%= context_names_for_autocomplete %>;
|
||||
var projectNames = <%= project_names_for_autocomplete %>;
|
||||
var defaultContexts = <%= default_contexts_for_autocomplete %>;
|
||||
var defaultTags = <%= default_tags_for_autocomplete %>;
|
||||
var tagNames = <%= tag_names_for_autocomplete %>;
|
||||
var contextNames = <%= context_names_for_autocomplete rescue '[]' %>;
|
||||
var projectNames = <%= project_names_for_autocomplete rescue '[]' %>;
|
||||
var defaultContexts = <%= default_contexts_for_autocomplete rescue '{}' %>;
|
||||
var defaultTags = <%= default_tags_for_autocomplete rescue '{}' %>;
|
||||
var tagNames = <%= tag_names_for_autocomplete rescue '[]' %>;
|
||||
var dateFormat = '<%= date_format_for_date_picker %>';
|
||||
var weekStart = '<%= current_user.prefs.week_starts %>';
|
||||
function relative_to_root(path) { return '<%= root_url %>'+path; };
|
||||
<% if @prefs.refresh != 0 -%>
|
||||
setup_auto_refresh(<%= @prefs["refresh"].to_i*60000 %>);
|
||||
<% end -%>
|
||||
</script>
|
||||
<link rel="shortcut icon" href="<%= url_for(:controller => 'favicon.ico') %>" />
|
||||
|
|
|
|||
|
|
@ -6,17 +6,12 @@
|
|||
|
||||
<div class="note_footer">
|
||||
<%= link_to_remote(
|
||||
image_tag("blank.png",
|
||||
:title =>"Delete this note",
|
||||
:class=>"delete_item",
|
||||
:id => "delete_note_"+note.id.to_s),
|
||||
{:update => dom_id(note),
|
||||
:loading => visual_effect(:fade, dom_id(note, 'container')),
|
||||
:complete => "$('#{dom_id(note, 'container')}').remove();",
|
||||
:url => note_path(note),
|
||||
image_tag("blank.png", :title =>"Delete this note", :class=>"delete_item", :id => "delete_note_"+note.id.to_s),
|
||||
:url => note_path(note),
|
||||
:html => {:class => 'delete_note', :title => "delete note"},
|
||||
:method => :delete,
|
||||
:confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?" },
|
||||
{ :class => 'delete_note' }) -%>
|
||||
:confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?",
|
||||
:before => visual_effect(:fade, dom_id(note, 'container'))) -%>
|
||||
<%= link_to_function(image_tag( "blank.png", :title => "Edit item", :class=>"edit_item"),
|
||||
"$('##{dom_id(note)}').toggle(); $('##{dom_id(note, 'edit')}').show(); $('##{dom_id(note, 'edit_form')} textarea').focus();" ) + " | " %>
|
||||
<%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %> |
|
||||
|
|
@ -38,3 +33,4 @@
|
|||
</div>
|
||||
</div>
|
||||
<% note = nil -%>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<div class="container">
|
||||
<h2 id="project_name"><% if collapsible %><a href="#" class="container_toggle" id="toggle_p<%= project.id %>"><%= image_tag("collapse.png") %></a><% end %><%= project.name -%></h2>
|
||||
<h2 id="project_name">
|
||||
<% if collapsible -%>
|
||||
<a href="#" class="container_toggle" id="toggle_p<%= project.id %>"><%= image_tag("collapse.png") %></a>
|
||||
<% end -%>
|
||||
<%= project.name -%></h2>
|
||||
<div id="<%= dom_id(project, "container")%>">
|
||||
<%= render :partial => "projects/project_settings", :locals => { :project => project, :collapsible => collapsible } %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@
|
|||
:method => 'get',
|
||||
:with => "'_source_view=#{@source_view}'",
|
||||
:before => "$('#{dom_id(project)}').block({message: null});",
|
||||
:complete => "$('#{dom_id(project)}').unblock();enable_rich_interaction();"
|
||||
:complete => "$('#{dom_id(project)}').unblock();enable_rich_interaction();",
|
||||
:html => {:id => "link_edit_#{dom_id(project)}"}
|
||||
) %>
|
||||
</div>
|
||||
<% unless project.description.blank? -%>
|
||||
<div class="project_description"><%= sanitize(project.description) %></div>
|
||||
<div class="project_description"><%= format_note(project.description) %></div>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;">
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
:position => "bottom",
|
||||
:complete => "$('#notes').effect('highlight', 1000);$('#empty-n').hide();$('#new-note form').clearForm();",
|
||||
:html => {:id=>'form-new-note', :class => 'inline-form'} do %>
|
||||
<%= hidden_field( "new_note", "project_id", "value" => "#{@project.id}" ) %>
|
||||
<%= text_area( "new_note", "body", "cols" => 50, "rows" => 3, "tabindex" => 1 ) %>
|
||||
<%= hidden_field( "note", "project_id", "value" => "#{@project.id}" ) %>
|
||||
<%= text_area( "note", "body", "cols" => 50, "rows" => 3, "tabindex" => 1 ) %>
|
||||
<br /><br />
|
||||
<input type="submit" value="Add note" name="add-new-note" tabindex="2" />
|
||||
<% end -%>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ page['todo_project_name'].value = @project.name
|
|||
|
||||
# renew project auto complete array
|
||||
page << "var projectNames = #{project_names_for_autocomplete};"
|
||||
page << "enable_rich_interaction();"
|
||||
|
||||
status_message = "Name of project was changed"
|
||||
page.notify :notice, status_message, 5.0
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
<% form_remote_tag(
|
||||
:url => recurring_todos_path, :method => :post,
|
||||
:html=> { :id=>'recurring-todo-form-new-action', :name=>'recurring_todo', :class => 'inline-form' },
|
||||
:before => "$('#recurring_todo_new_action_submit').block({message: null})",
|
||||
:complete => "$('#recurring_todo_new_action_submit').unblock();$('#recurring-todo-form-new-action').clearForm();") do
|
||||
:before => "$('#recurring_todo_new_action_submit').block({message: null})") do
|
||||
-%>
|
||||
<div id="new_status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
|
||||
|
|
@ -18,7 +17,7 @@
|
|||
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
|
||||
|
||||
<label for="recurring_todo_context_name">Context</label>
|
||||
<input id="recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="" />
|
||||
<input id="recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= current_user.contexts.first.name unless current_user.contexts.first.nil?%>" />
|
||||
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
|
||||
<label for="tag_list">Tags (separate with commas)</label>
|
||||
<%= text_field_tag "tag_list", nil, :size => 30, :tabindex => 5 -%>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ page.replace_html 'new_status', "#{error_messages_for('recurring_todo')}"
|
|||
page.notify :notice, @message, 5.0
|
||||
if @recurring_saved
|
||||
# reset form
|
||||
page << "TracksForm.hide_all_recurring(); $('#recurring_daily').show();"
|
||||
page << "$('#recurring_todo_new_action_submit').unblock();$('#recurring-todo-form-new-action').clearForm();"
|
||||
page['new-recurring-todo'].replace_html :partial => 'recurring_todo_form'
|
||||
# hide overlayed edit form
|
||||
page << "TracksForm.toggle_overlay();"
|
||||
# insert new recurring todo
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<div id="status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
|
||||
<label for="todo_description">Description</label>
|
||||
<%= text_field( "todo", "description", "size" => 30, "tabindex" => 1, "maxlength" => 100, "autocomplete" => "off") %>
|
||||
<%= text_field( "todo", "description", "size" => 30, "tabindex" => 1, "maxlength" => 100, "autocomplete" => "off", :autofocus => 1) %>
|
||||
|
||||
<label for="todo_notes">Notes</label>
|
||||
<%= text_area( "todo", "notes", "cols" => 29, "rows" => 6, "tabindex" => 2) %>
|
||||
|
|
|
|||
|
|
@ -13,22 +13,15 @@
|
|||
<div class="project_input">
|
||||
<label for="<%= dom_id(@todo, 'project_name') %>">Project</label>
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" tabindex="10" size="30" type="text" value="<%= @todo.project.nil? ? 'None' : @todo.project.name.gsub(/"/,""") %>" />
|
||||
<div class="page_name_auto_complete" id="<%= dom_id(@todo, 'project_list') %>" style="display:none"></div>
|
||||
</div>
|
||||
|
||||
<div class="context_input">
|
||||
<label for="<%= dom_id(@todo, 'context_name') %>">Context</label>
|
||||
<input id="<%= dom_id(@todo, 'context_name') %>" name="context_name" autocomplete="off" tabindex="11" size="30" type="text" value="<%= @todo.context.name %>" />
|
||||
<div class="page_name_auto_complete" id="<%= dom_id(@todo, 'context_list') %>" style="display:none"></div>
|
||||
</div>
|
||||
|
||||
<label class="tag_list_label" for="<%= dom_id(@todo, 'tag_list') %>">Tags (separate with commas)</label>
|
||||
<%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30, :tabindex => 12 %>
|
||||
<%= content_tag("div", "", :id => dom_id(@todo, 'tag_list')+"_auto_complete", :class => "auto_complete") %>
|
||||
<%= auto_complete_field dom_id(@todo, 'tag_list'), {
|
||||
:url => {:controller => 'todos', :action => 'auto_complete_for_tag'},
|
||||
:tokens => [',']
|
||||
} %>
|
||||
|
||||
<div class="due_input">
|
||||
<label for="<%= dom_id(@todo, 'due_label') %>">Due</label>
|
||||
|
|
@ -48,11 +41,6 @@
|
|||
|
||||
<label class="predecessor_list_label" for="<%= dom_id(@todo, 'predecessor_list') %>">Depends on (separate with commas)</label>
|
||||
<%= text_field_tag 'predecessor_list', predecessor_list_text, :id => dom_id(@todo, 'predecessor_list'), :size => 30, :tabindex => 15 %>
|
||||
<%= content_tag("div", "", :id => dom_id(@todo, 'predecessor_list')+"_auto_complete", :class => "auto_complete") %>
|
||||
<%= auto_complete_field dom_id(@todo, 'predecessor_list'), {
|
||||
:url => {:controller => 'todos', :action => 'auto_complete_for_predecessor', :id => @todo.id},
|
||||
:tokens => [',']
|
||||
} %>
|
||||
|
||||
<% if controller.controller_name == "project" || @todo.deferred? -%>
|
||||
<input type="hidden" name="on_project_page" value="true" />
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ if parent_container_type == 'show_mobile' -%>
|
|||
<p><label for="todo_done">Done?</label> <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1) %></p>
|
||||
<% end -%>
|
||||
<h2><label for="todo_description">Description</label></h2>
|
||||
<%= text_field( "todo", "description", "tabindex" => 2, "maxlength" => 100) %>
|
||||
<%= text_field( "todo", "description", "tabindex" => 2, "maxlength" => 100, "size" => 50) %>
|
||||
<h2><label for="todo_notes">Notes</label></h2>
|
||||
<%= text_area( "todo", "notes", "cols" => 30, "rows" => 2, "tabindex" => 3) %>
|
||||
<%= text_area( "todo", "notes", "cols" => 40, "rows" => 3, "tabindex" => 3) %>
|
||||
<h2><label for="todo_context_id">Context</label></h2>
|
||||
<%= unless @mobile_from_context
|
||||
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 4} )
|
||||
|
|
@ -31,7 +31,7 @@ else
|
|||
{"id" => :todo_project_id, :tabindex => 5} )
|
||||
end %>
|
||||
<h2><label for="tag_list">Tags (separate with commas)</label></h2>
|
||||
<%= text_field_tag "tag_list", @tag_list_text, :size => 30, :tabindex => 6 %>
|
||||
<%= text_field_tag "tag_list", @tag_list_text, :size => 50, :tabindex => 6 %>
|
||||
<h2><label for="todo_due">Due</label></h2>
|
||||
<%= date_select("todo", "due", {:order => [:day, :month, :year],
|
||||
:start_year => this_year, :include_blank => '--'}, :tabindex => 7) %>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
|||
<div id="<%= dom_id(todo, 'line') %>" class="item-show">
|
||||
<%= remote_star_icon %>
|
||||
<%= remote_toggle_checkbox unless source_view_is :deferred %>
|
||||
<% unless suppress_edit_button %>
|
||||
<%= remote_edit_button %>
|
||||
<% end %>
|
||||
<ul class="sf-menu sf-item-menu">
|
||||
<li style="z-index:<%=@z_index_counter%>"><%= image_tag "downarrow.png", :alt=> "" %>
|
||||
<ul id="ul<%= dom_id(todo) %>">
|
||||
<% unless suppress_edit_button %>
|
||||
<li><%= remote_edit_menu_item(parameters, todo) %></li>
|
||||
<% end %>
|
||||
<li><%= remote_delete_menu_item(parameters, todo) %></li>
|
||||
<% unless todo.completed? || todo.deferred? %>
|
||||
<li><%= remote_defer_menu_item(1, todo) %></li>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,14 @@ if @saved
|
|||
# regenerate predecessor to add arrow
|
||||
page[@predecessor].replace_html :partial => 'todos/todo', :locals => { :todo => @predecessor, :parent_container_type => parent_container_type }
|
||||
|
||||
# regenerate predecessor family
|
||||
parents = @predecessor.predecessors
|
||||
until parents.empty?
|
||||
parent = parents.pop
|
||||
parents += parent.predecessors
|
||||
page[parent].replace_html :partial => 'todos/todo', :locals => { :todo => parent, :parent_container_type => parent_container_type }
|
||||
end
|
||||
|
||||
# show in tickler box in project view
|
||||
if source_view_is_one_of :project, :tag
|
||||
page['tickler-empty-nd'].hide
|
||||
|
|
|
|||
|
|
@ -52,13 +52,6 @@
|
|||
|
||||
</div><!-- End of display_box -->
|
||||
<div class="input_box" id="input_box">
|
||||
<% # hack for #860 Need to refactor this and use another dom element to bind projectDefauiltContextsMap to -%>
|
||||
<input type="hidden" id="todo_context_name" value="hidden">
|
||||
<script type="text/javascript">
|
||||
var contextNames = <%= context_names_for_autocomplete %>;
|
||||
var projectNames = <%= project_names_for_autocomplete %>;
|
||||
$('todo_context_name').projectDefaultContextsMap = eval('(' + <%= @default_project_context_name_map %> + ')');
|
||||
</script>
|
||||
<p><%= link_to('<span class="feed">iCal</span>', {:format => 'ics', :token => current_user.token}, :title => "iCal feed" ) %>
|
||||
- Get this calendar in iCal format</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ page[dom_id(@todo, 'form')].find('.placeholder').show().replace_html :partial =>
|
|||
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();"
|
||||
|
|
@ -1 +1 @@
|
|||
<%= render :partial => "contexts/text_context", :collection => @contexts, :locals => { :todos => @todos } %>
|
||||
<%= render :partial => "contexts/text_context", :collection => @contexts, :locals => { :todos => @todos, :not_done_todos => @not_done_todos } %>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@ if @removed
|
|||
# replace old predecessor with one without the successor
|
||||
page.replace dom_id(@predecessor), :partial => 'todos/todo', :locals => {
|
||||
:todo => @predecessor, :parent_container_type => parent_container_type }
|
||||
|
||||
# regenerate predecessor family
|
||||
parents = @predecessor.predecessors
|
||||
until parents.empty?
|
||||
parent = parents.pop
|
||||
parents += parent.predecessors
|
||||
page[parent].replace_html :partial => 'todos/todo', :locals => { :todo => parent, :parent_container_type => parent_container_type }
|
||||
end
|
||||
|
||||
# update display if pending->active
|
||||
if @successor.active?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue