Merge branch 'master' of git://github.com/bsag/tracks into bsag

This commit is contained in:
Hans de Graaff 2010-03-27 11:22:52 +01:00
commit 8109d9ec7d
257 changed files with 24751 additions and 2042 deletions

View file

@ -276,8 +276,6 @@ class ApplicationController < ActionController::Base
def set_time_zone
Time.zone = current_user.prefs.time_zone if logged_in?
locale = params[:locale] || 'en-US'
I18n.locale = locale
end
def set_zindex_counter

View file

@ -27,13 +27,29 @@ class NotesController < ApplicationController
def create
note = current_user.notes.build
note.attributes = params["new_note"]
if note.save
render :partial => 'notes_summary', :object => note
else
render :text => ''
end
note.attributes = params["note"]
saved = note.save
respond_to do |format|
format.js do
if note.save
render :partial => 'notes_summary', :object => note
else
render :text => ''
end
end
format.xml do
if saved
head :created, :location => note_url(note), :text => "new note with id #{note.id}"
else
render_failure note.errors.full_messages.join(', ')
end
end
format.html do
render :text => 'unexpected request for html rendering'
end
end
end
def destroy

View file

@ -7,7 +7,6 @@ class PreferencesController < ApplicationController
def edit
@page_title = "TRACKS::Edit Preferences"
render :object => prefs
end
def update
@ -20,4 +19,4 @@ class PreferencesController < ApplicationController
end
end
end
end

View file

@ -2,7 +2,7 @@ class RecurringTodosController < ApplicationController
helper :todos, :recurring_todos
append_before_filter :init, :only => [:index, :new, :edit]
append_before_filter :init, :only => [:index, :new, :edit, :create]
append_before_filter :get_recurring_todo_from_param, :only => [:destroy, :toggle_check, :toggle_star, :edit, :update]
def index
@ -243,7 +243,7 @@ class RecurringTodosController < ApplicationController
private
def init
def init
@days_of_week = [ ['Sunday',0], ['Monday',1], ['Tuesday', 2], ['Wednesday',3], ['Thursday',4], ['Friday',5], ['Saturday',6]]
@months_of_year = [
['January',1], ['Februari',2], ['March', 3], ['April',4], ['May',5], ['June',6],

View file

@ -6,9 +6,9 @@ class TodosController < ApplicationController
prepend_before_filter :login_or_feed_token_required, :only => [:index, :calendar]
append_before_filter :init, :except => [ :destroy, :completed,
:completed_archive, :check_deferred, :toggle_check, :toggle_star,
:edit, :update, :create, :calendar, :auto_complete_for_tag, :auto_complete_for_predecessor, :remove_predecessor, :add_predecessor]
:edit, :update, :create, :calendar, :auto_complete_for_predecessor, :remove_predecessor, :add_predecessor]
append_before_filter :get_todo_from_params, :only => [ :edit, :toggle_check, :toggle_star, :show, :update, :destroy, :remove_predecessor]
protect_from_forgery :except => [:auto_complete_for_tag, :auto_complete_for_predecessor]
protect_from_forgery :except => [:auto_complete_for_predecessor]
def index
current_user.deferred_todos.find_and_activate_ready
@ -77,7 +77,7 @@ class TodosController < ApplicationController
@todo.tags.reload
end
unless (@aved == false)
unless (@saved == false)
unless @todo.uncompleted_predecessors.empty? || @todo.state == 'project_hidden'
@todo.state = 'pending'
end
@ -140,8 +140,8 @@ class TodosController < ApplicationController
def add_predecessor
@source_view = params['_source_view'] || 'todo'
@predecessor = Todo.find(params['predecessor'])
@todo = Todo.find(params['successor'])
@predecessor = current_user.todos.find(params['predecessor'])
@todo = current_user.todos.find(params['successor'])
@original_state = @todo.state
# Add predecessor
@todo.add_predecessor(@predecessor)
@ -154,7 +154,7 @@ class TodosController < ApplicationController
def remove_predecessor
@source_view = params['_source_view'] || 'todo'
@predecessor = Todo.find(params['predecessor'])
@predecessor = current_user.todos.find(params['predecessor'])
@successor = @todo
@removed = @successor.remove_predecessor(@predecessor)
respond_to do |format|
@ -590,14 +590,6 @@ class TodosController < ApplicationController
}
end
end
def auto_complete_for_tag
@items = Tag.find(:all,
:conditions => [ "name LIKE ?", '%' + params['tag_list'] + '%' ],
:order => "name ASC",
:limit => 10)
render :inline => "<%= auto_complete_result(@items, :name) %>"
end
def auto_complete_for_predecessor
unless params['id'].nil?
@ -640,8 +632,8 @@ class TodosController < ApplicationController
end
def convert_to_project
@todo = Todo.find(params[:id])
@project = Project.new(:name => @todo.description, :description => @todo.notes,
@todo = current_user.todos.find(params[:id])
@project = current_user.projects.new(:name => @todo.description, :description => @todo.notes,
:default_context => @todo.context)
@todo.destroy
@project.save!

View file

@ -24,14 +24,12 @@ module TodosHelper
:class => "icon star_item", :title => "star the action '#{@todo.description}'")
end
def remote_edit_menu_item(parameters, todo)
return link_to_remote(
image_tag("edit_off.png", :mouseover => "edit_on.png", :alt => "Edit", :align => "absmiddle", :id => 'edit_icon_todo_'+todo.id.to_s)+" Edit",
:url => {:controller => 'todos', :action => 'edit', :id => todo.id},
:method => 'get',
:with => "'#{parameters}'",
:before => todo_start_waiting_js(todo),
:complete => todo_stop_waiting_js(todo))
def remote_edit_button
link_to(
image_tag("blank.png", :alt => "Edit", :align => "absmiddle", :id => 'edit_icon_todo_'+@todo.id.to_s, :class => 'edit_item'),
{:controller => 'todos', :action => 'edit', :id => @todo.id},
:class => "icon edit_item",
:title => "Edit the action '#{@todo.description}'")
end
def remote_delete_menu_item(parameters, todo)
@ -70,7 +68,7 @@ module TodosHelper
:_source_view => (@source_view.underscore.gsub(/\s+/,'_') rescue "")}
url[:_tag_name] = @tag_name if @source_view == 'tag'
return link_to("Promote to project", url)
return link_to(image_tag("to_project_off.png", :align => "absmiddle")+" Make project", url)
end
def todo_start_waiting_js(todo)
@ -121,8 +119,10 @@ module TodosHelper
def grip_span
unless @todo.completed?
image_tag('grip.png', :width => '7', :height => '16', :border => '0',
:title => 'Drag onto another action to make it depend on that action',
:class => 'grip')
:title => 'Drag onto another action to make it depend on that action',
:class => 'grip') +
image_tag('blank.png', :width => 16, :height => 16, :border => 0,
:title => "Drop an action to make it depend on this action", :class => 'successor_target')
end
end

View file

@ -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"),

View file

@ -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 -%>

View file

@ -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

View file

@ -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">

View file

@ -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 />

View file

@ -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') %>" />

View file

@ -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' }) -%>&nbsp;
:confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?",
:before => visual_effect(:fade, dom_id(note, 'container'))) -%>&nbsp;
<%= 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" ) %>&nbsp;|&nbsp;
@ -38,3 +33,4 @@
</div>
</div>
<% note = nil -%>

View file

@ -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>

View file

@ -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;">

View file

@ -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 -%>

View file

@ -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

View file

@ -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 -%>

View file

@ -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

View file

@ -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) %>

View file

@ -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(/"/,"&quot;") %>" />
<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" />

View file

@ -8,9 +8,9 @@ if parent_container_type == 'show_mobile' -%>
<p><label for="todo_done">Done?</label>&nbsp;<%= 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) %>

View file

@ -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>

View file

@ -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

View file

@ -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>

View file

@ -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();"

View file

@ -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 } %>

View file

@ -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?